'Return True if the received required_repository must be installed before the
received repository.'

def set_prior_installation_required(self, repository, required_repository):

    tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry(self.app, str(required_repository.tool_shed))
    required_repository_tup = [tool_shed_url, str(required_repository.name), str(required_repository.owner), str(required_repository.changeset_revision)]
    required_rd_tups_that_must_be_installed = repository.requires_prior_installation_of
    for required_rd_tup in required_rd_tups_that_must_be_installed:
        partial_required_rd_tup = required_rd_tup[0:4]
        if (partial_required_rd_tup == required_repository_tup):
            return str(required_rd_tup[4])
    return 'False'
