code: def findInRemotesByName(self, name: str):
          
          remotes = [r for r in self.remotes.values()
                     if r.name == name]
          if len(remotes) > 1:
              raise DuplicateRemotes(remotes)
          if not remotes:
              raise RemoteNotFound(name)
          return remotes[0]
docs: Find the remote by name.
  
          :param name: the name of the remote to find
          :raises: RemoteNotFound