docs: def action_import(location, verbose=True):
      """
      Import files into the local repo
      """
  
      location = str(location)  # prevent errors from unicode being passed
  
      # 1) extract file from location and save locally
      ONTOSPY_LOCAL_MODELS = get_home_location()
      fullpath = ""
  
      try:
          if location.startswith("www."):  #support for lazy people
              location = "http://%s" % str(location)
          if location.startswith("http"):
              # print("here")
              headers = {'Accept': "application/rdf+xml"}
              try:
                  # Py2
                  req = urllib2.request(location, headers=headers)
                  res = urllib2.urlopen(req)
              except:
                  # Py3
                  req = urllib.request.Request(location, headers=headers)
                  res = urlopen(req)
              final_location = res.geturl()  # after 303 redirects
              printDebug("Saving data from <%s>" % final_location, "green")
              # filename = final_location.split("/")[-1] or final_location.split("/")[-2]
              filename = location.replace("http://", "").replace("/", "_")
              if not filename.lower().endswith(
                  ('.rdf', '.owl', '.rdfs', '.ttl', '.n3')):
                  filename = filename + ".rdf"
              fullpath = ONTOSPY_LOCAL_MODELS + "/" + filename  # 2016-04-08
              # fullpath = ONTOSPY_LOCAL_MODELS + filename
  
              # print("==DEBUG", final_location, "**", filename,"**", fullpath)
  
              file_ = open(fullpath, 'wb')
              file_.write(res.read())
              file_.close()
          else:
              if os.path.isfile(location):
                  filename = location.split("/")[-1] or location.split("/")[-2]
                  fullpath = ONTOSPY_LOCAL_MODELS + "/" + filename
                  shutil.copy(location, fullpath)
              else:
                  raise ValueError('The location specified is not a file.')
          # print("Saved local copy")
      except:
          printDebug(
              "Error retrieving file. Please make sure <%s> is a valid location."
              % location, "important")
          if os.path.exists(fullpath):
              os.remove(fullpath)
          return None
  
      try:
          g = Ontospy(fullpath, verbose=verbose)
          # printDebug("----------")
      except:
          g = None
          if os.path.exists(fullpath):
              os.remove(fullpath)
          printDebug(
              "Error parsing file. Please make sure %s contains valid RDF." %
              location, "important")
  
      if g:
          printDebug("Caching...", "red")
          do_pickle_ontology(filename, g)
          printDebug("----------\n...completed!", "important")
  
      # finally...
      return g