docs: def get_or_create_namespace(self, url: str) -> Union[Namespace, Dict]:
          """Insert the namespace file at the given location to the cache.
  
          If not cachable, returns the dict of the values of this namespace.
  
          :raises: pybel.resources.exc.ResourceError
          """
          result = self.get_namespace_by_url(url)
  
          if result is not None:
              return result
  
          t = time.time()
  
          bel_resource = get_bel_resource(url)
  
          _clean_bel_namespace_values(bel_resource)
  
          values = bel_resource['Values']
  
          if not_resource_cachable(bel_resource):
              log.debug('not caching namespace: %s (%d terms in %.2f seconds)', url, len(values), time.time() - t)
              log.debug('loaded uncached namespace: %s (%d)', url, len(values))
              return values
  
          namespace_insert_values = _get_namespace_insert_values(bel_resource)
  
          namespace = Namespace(
              url=url,
              **namespace_insert_values
          )
          namespace.entries = [
              NamespaceEntry(name=name, encoding=encoding)
              for name, encoding in values.items()
          ]
  
          log.info('inserted namespace: %s (%d terms in %.2f seconds)', url, len(values), time.time() - t)
  
          self.session.add(namespace)
          self.session.commit()
  
          return namespace