<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_request_ids_from_environment(logger, name, event_dict):
 """Custom processor adding request IDs to the log event, if available."""

    if ENV_APIG_REQUEST_ID in os.environ:
        event_dict['api_request_id'] = os.environ[ENV_APIG_REQUEST_ID]
    if ENV_LAMBDA_REQUEST_ID in os.environ:
        event_dict['lambda_request_id'] = os.environ[ENV_LAMBDA_REQUEST_ID]
    return event_dict