def encode_copy_value(value):
if value is None:<EOL><INDENT>return POSTGRES_COPY_NULL_VALUE<EOL><DEDENT>return value.translate(ENCODE_TRANSLATE_TABLE)<EOL>
Encodes given value into format suitable for Postgres `COPY` statement.

:param value: Value to encode.
:type value: str|None

:return: Given value encoded into format that is suitable to be used in the
         `COPY` command.
:rtype: str