def list_repositories(self, state=None, json_out=False):
    "List the backup repositories.\n\n        If a repository state is given only repositories in that state will be listed. This command supports listing both in\n        json and human friendly format.\n\n        Args:\n            state (str, optional): One of ['active', 'imported', 'archived']. The repository on this state will be\n                retrieved.\n            json_out (bool): If True the output will be JSON otherwise it will be a human friendly format.\n        "
    states = (['active', 'archived', 'imported'] if (state is None) else [state])
    results = {}
    for get_state in states:
        (repositories, errors) = self.rest.get_backup_service_repositories(state=get_state)
        _exit_if_errors(errors)
        results[get_state] = repositories
    if json_out:
        print(json.dumps(results, indent=2))
    else:
        self.human_friendly_print_repositories(results)
List the backup repositories.

If a repository state is given only repositories in that state will be listed. This command supports listing both in
json and human friendly format.

Args:
    state (str, optional): One of ['active', 'imported', 'archived']. The repository on this state will be
        retrieved.
    json_out (bool): If True the output will be JSON otherwise it will be a human friendly format.
def list_repositories(self, state=None, json_out=False):
    "List the backup repositories.\n\n        If a repository state is given only repositories in that state will be listed. This command supports listing both in\n        json and human friendly format.\n\n        Args:\n            state (str, optional): One of ['active', 'imported', 'archived']. The repository on this state will be\n                retrieved.\n            json_out (bool): If True the output will be JSON otherwise it will be a human friendly format.\n        "
    states = (['active', 'archived', 'imported'] if (state is None) else [state])
    results = {}
    for get_state in states:
        (repositories, errors) = self.rest.get_backup_service_repositories(state=get_state)
        _exit_if_errors(errors)
        results[get_state] = repositories
    if json_out:
        print(json.dumps(results, indent=2))
    else:
        self.human_friendly_print_repositories(results)