code: def get_or_create_index(self, paths=None, name=None, refresh=False):
          
          if not paths:
              paths = sys.path
          if not name:
              name = 'default'
          self._name = name
  
          idx_dir = get_cache_dir()
          idx_file = os.path.join(idx_dir, name + '.json')
  
          if os.path.exists(idx_file) and not refresh:
              with open(idx_file) as fd:
                  self.deserialize(fd)
          else:
              self.build_index(paths)
              with open(idx_file, 'w') as fd:
                  self.serialize(fd)
  
          return self
docs: Get index with given name from cache. Create if it doesn't exists.