def METHOD_NAME(path):
    """
    Args:
        path: a job directory like "/kubernetes-jenkins/jobs/e2e-gce"
    Returns:
        test_group_name: the group name in the config, or None if not found
    """
    try:
        config = get_config()
    except gcs.errors.Error:
        logging.exception('unable to load testgrid config')
        return None
    path = path.strip('/')  # the config doesn't have leading/trailing slashes
    if '/pull/' in path:  # translate PR to all-pr result form
        path = re.sub(r'/pull/([^/]+/)?\d+/', '/directory/', path)
    for test_group in config.get('test_groups', []):
        if path in test_group['query']:
            return test_group['name'][0]