def to_normalized_address(value: AnyStr) -> HexAddress:
try:<EOL><INDENT>hex_address = hexstr_if_str(to_hex, value).lower()<EOL><DEDENT>except AttributeError:<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>".format(type(value))<EOL>)<EOL><DEDENT>if is_address(hex_address):<EOL><INDENT>return HexAddress(hex_address)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(value, hex_address)<EOL>)<EOL><DEDENT>
Converts an address to its normalized hexadecimal representation.