<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_postgres_encoding(python_encoding: str) -> str: """Python to postgres encoding map."""


    encoding = normalize_encoding(python_encoding.lower())
    encoding_ = aliases.aliases[encoding.replace('_', '', 1)].upper()
    pg_encoding = PG_ENCODING_MAP[encoding_.replace('_', '')]

    return pg_encoding