<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_relay_config(project):
 """ Generate Relay Proxy Configuration. Generate a ld-relay.conf file to quickly spin up a relay proxy. Right now this is mostly used for integration testing. :param project: LaunchDarkly project key """

    ld_api = LaunchDarklyApi(
        os.environ.get('LD_API_KEY'),
        project_key=project
    )
    config = ConfigGenerator()

    envs = ld_api.get_environments(project)
    config.generate_relay_config(envs)