def encode(input, encoding=UTF8, errors='<STR_LIT:strict>'):
return _get_encoding(encoding).codec_info.encode(input, errors)[<NUM_LIT:0>]<EOL>
Encode a single string.

:param input: An Unicode string.
:param encoding: An :class:`Encoding` object or a label string.
:param errors: Type of error handling. See :func:`codecs.register`.
:raises: :exc:`~exceptions.LookupError` for an unknown encoding label.
:return: A byte string.