<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def configure_basic_auth_decorator(graph):
 """ Configure a basic auth decorator. """

    # use the metadata name if no realm is defined
    graph.config.setdefault("BASIC_AUTH_REALM", graph.metadata.name)
    return ConfigBasicAuth(
        app=graph.flask,
        # wrap in dict to allow lists of items as well as dictionaries
        credentials=dict(graph.config.basic_auth.credentials),
    )