code: def load(data):
      
  
      if hasattr(data, 'read') and callable(data.read):
        contents = data.read()
      elif isinstance(data, six.string_types):
        contents = data
      else:
        raise TypeError('Can only process data from a string or a readable object, given: %s' % data)
  
      return Properties._parse(contents.splitlines())
docs: Loads properties from an open stream or the contents of a string.
  
      :API: public
  
      :param (string | open stream) data: An open stream or a string.
      :returns: A dict of parsed property data.
      :rtype: dict