parameters: (bytes_or_text)
docstring: Returns the given argument as a unicode string.
  
    Args:
      bytes_or_text: A `bytes`, `str, or `unicode` object.
  
    Returns:
      A `unicode` (Python 2) or `str` (Python 3) object.
  
    Raises:
      TypeError: If `bytes_or_text` is not a binary or unicode string.
docstring_summary: Returns the given argument as a unicode string.
docstring_tokens: Returns the given argument as a unicode string .
function: def as_text(bytes_or_text):
    """Returns the given argument as a unicode string.
  
    Args:
      bytes_or_text: A `bytes`, `str, or `unicode` object.
  
    Returns:
      A `unicode` (Python 2) or `str` (Python 3) object.
  
    Raises:
      TypeError: If `bytes_or_text` is not a binary or unicode string.
    """
    if isinstance(bytes_or_text, six.text_type):
      return bytes_or_text
    elif isinstance(bytes_or_text, bytes):
      return bytes_or_text.decode('utf-8')
    else:
      raise TypeError('Expected binary or unicode string, got %r' % bytes_or_text)
function_tokens: def as_text ( bytes_or_text ) : if isinstance ( bytes_or_text , six . text_type ) : return bytes_or_text elif isinstance ( bytes_or_text , bytes ) : return bytes_or_text . decode ( 'utf-8' ) else : raise TypeError ( 'Expected binary or unicode string, got %r' % bytes_or_text )