code: def get_postgres_encoding(python_encoding: str) -> str:
      
  
      encoding = normalize_encoding(python_encoding.lower())
      encoding_ = aliases.aliases[encoding.replace('_', '', 1)].upper()
      pg_encoding = PG_ENCODING_MAP[encoding_.replace('_', '')]
  
      return pg_encoding
docs: Python to postgres encoding map.