<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_repo_scope(task, name):
 """Given a parent task, return the repo scope for the task. Background in https://bugzilla.mozilla.org/show_bug.cgi?id=1459705#c3 Args: task (dict):
 the task definition. Raises: ValueError: on too many `repo_scope`s (we allow for 1 or 0). Returns: str: the ``repo_scope`` None: if no ``repo_scope`` is found """

    repo_scopes = []
    for scope in task['scopes']:
        if REPO_SCOPE_REGEX.match(scope):
            repo_scopes.append(scope)
    if len(repo_scopes) > 1:
        raise ValueError(
            "{}: Too many repo_scopes: {}!".format(name, repo_scopes)
        )
    if repo_scopes:
        return repo_scopes[0]