<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_key_provider(graph, key_ids):
 """ Configure a key provider. During unit tests, use a static key provider (e.g. without AWS calls). """

    if graph.metadata.testing:
        # use static provider
        provider = StaticMasterKeyProvider()
        provider.add_master_keys_from_list(key_ids)
        return provider

    # use AWS provider
    return KMSMasterKeyProvider(key_ids=key_ids)