code: def _read(obj):
      """Try to read from a url, file or string.
  
      Parameters
      ----------
      obj : str, unicode, or file-like
  
      Returns
      -------
      raw_text : str
      """
      if _is_url(obj):
          with urlopen(obj) as url:
              text = url.read()
      elif hasattr(obj, "read"):
          text = obj.read()
      elif isinstance(obj, char_types):
          text = obj
          try:
              if os.path.isfile(text):
                  with open(text, "rb") as f:
                      return f.read()
          except (TypeError, ValueError):
              pass
      else:
          raise TypeError(
              "Cannot read object of type %r" % type(obj).__name__
          )
      return text
  
imports: from distutils.version import LooseVersion
  import numbers
  import os
  import re
  import pandas.compat
  from pandas.compat import binary_type, iteritems, lmap, lrange, raise_with_traceback, string_types, u
  from pandas.errors import AbstractMethodError, EmptyDataError
  from pandas.core.dtypes.common import is_list_like
  from pandas import Series
  from pandas.io.common import _is_url, _validate_header_arg, urlopen
  from pandas.io.formats.printing import pprint_thing
  from pandas.io.parsers import TextParser
label_desc: Use image node_id 4 for calling a global function with example usage: _read(obj) and returns: text, f