<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def edit_repo(name,
              description=None,
              homepage=None,
              private=None,
              has_issues=None,
              has_wiki=None,
              has_downloads=None,
              profile="github"):
    '''
    Updates an existing Github repository.

    name
        The name of the team to be created.

    description
        The description of the repository.

    homepage
        The URL with more information about the repository.

    private
        The visiblity of the repository. Note that private repositories require
        a paid GitHub account.

    has_issues
        Whether to enable issues for this repository.

    has_wiki
        Whether to enable the wiki for this repository.

    has_downloads
        Whether to enable downloads for this repository.

    profile
        The name of the profile configuration to use. Defaults to ``github``.

    CLI Example:

    .. code-block:: bash

        salt myminion github.add_repo 'repo_name'

    .. versionadded:: 2016.11.0
    '''

    try:
        allow_private_change = _get_config_value(profile, 'allow_repo_privacy_changes')
    except CommandExecutionError:
        allow_private_change = False

    if private is not None and not allow_private_change:
        raise CommandExecutionError("The private field is set to be changed for "
                                    "repo {0} but allow_repo_privacy_changes "
                                    "disallows this.".format(name))

    try:
        client = _get_client(profile)
        organization = client.get_organization(
            _get_config_value(profile, 'org_name')
        )
        repo = organization.get_repo(name)

        given_params = {
            'description': description,
            'homepage': homepage,
            'private': private,
            'has_issues': has_issues,
            'has_wiki': has_wiki,
            'has_downloads': has_downloads
        }
        parameters = {'name': name}
        for param_name, param_value in six.iteritems(given_params):
            if param_value is not None:
                parameters[param_name] = param_value

        organization._requester.requestJsonAndCheck(
            "PATCH",
            repo.url,
            input=parameters
        )
        get_repo_info(name, profile=profile, ignore_cache=True)  # Refresh cache
        return True
    except github.GithubException:
        log.exception('Error editing a repo')
        return False