code: def find_source(self, source):
          
          if not is_valid_url(source):
              try:
                  source = self.get_source(name=source)
              except SourceNotFound:
                  source = self.get_source(url=source)
          else:
              source = self.get_source(url=source)
          return source
docs: Given a source, find it.
  
          source can be a url or an index name.