<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_airflow_spec(name, pipeline_spec):
 """ Gets the airflow python spec for the Pipeline object. """

    task_definitions = ''
    up_steam_statements = ''
    parameters = pipeline_spec.get('parameters')
    for (task_id, task_details) in sorted(pipeline_spec['tasks'].items()):
      task_def = PipelineGenerator._get_operator_definition(task_id, task_details, parameters)
      task_definitions = task_definitions + task_def
      dependency_def = PipelineGenerator._get_dependency_definition(
        task_id, task_details.get('up_stream', []))
      up_steam_statements = up_steam_statements + dependency_def

    schedule_config = pipeline_spec.get('schedule', {})

    default_args = PipelineGenerator._get_default_args(schedule_config,
                                                       pipeline_spec.get('emails', {}))
    dag_definition = PipelineGenerator._get_dag_definition(
      name, schedule_config.get('interval', '@once'), schedule_config.get('catchup', False))
    return PipelineGenerator._imports + default_args + dag_definition + task_definitions + \
        up_steam_statements