parameters: (encoding_or_label)
return_statement: return encoding
docstring: Accept either an encoding object or label.
  
      :param encoding: An :class:`Encoding` object or a label string.
      :returns: An :class:`Encoding` object.
      :raises: :exc:`~exceptions.LookupError` for an unknown label.
docstring_summary: Accept either an encoding object or label.
docstring_tokens: Accept either an encoding object or label .
function: def _get_encoding(encoding_or_label):
      """
      Accept either an encoding object or label.
  
      :param encoding: An :class:`Encoding` object or a label string.
      :returns: An :class:`Encoding` object.
      :raises: :exc:`~exceptions.LookupError` for an unknown label.
  
      """
      if hasattr(encoding_or_label, 'codec_info'):
          return encoding_or_label
  
      encoding = lookup(encoding_or_label)
      if encoding is None:
          raise LookupError('Unknown encoding label: %r' % encoding_or_label)
      return encoding
function_tokens: def _get_encoding ( encoding_or_label ) : if hasattr ( encoding_or_label , 'codec_info' ) : return encoding_or_label encoding = lookup ( encoding_or_label ) if encoding is None : raise LookupError ( 'Unknown encoding label: %r' % encoding_or_label ) return encoding