code: def get_teams_by_name(org, team_names):
      
      assert isinstance(org, github.Organization.Organization), type(org)
  
      try:
          org_teams = list(org.get_teams())
      except github.RateLimitExceededException:
          raise
      except github.GithubException as e:
          msg = 'error getting teams'
          raise CaughtOrganizationError(org, e, msg) from None
  
      found_teams = []
      for name in team_names:
          debug("looking for team: {o}/'{t}'".format(
              o=org.login,
              t=name
          ))
  
          t = next((t for t in org_teams if t.name == name), None)
          if t:
              debug('  found')
              found_teams.append(t)
          else:
              debug('  not found')
  
      return found_teams
docs: Find team(s) in org by name(s).
  
      Parameters
      ----------
      org: github.Organization.Organization
          org to search for team(s)
  
      teams: list(str)
          list of team names to search for
  
      Returns
      -------
      list of github.Team.Team objects
  
      Raises
      ------
      github.GithubException
          Upon error from github api