<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def role_list(request, filters=None):
 """Returns a global list of available roles."""

    manager = keystoneclient(request, admin=True).roles
    roles = []
    kwargs = {}
    if filters is not None:
        kwargs.update(filters)
    if 'id' in kwargs:
        try:
            roles = [manager.get(kwargs['id'])]
        except keystone_exceptions.NotFound:
            roles = []
        except Exception:
            exceptions.handle(request)
    else:
        roles = manager.list(**kwargs)
    return roles