def METHOD_NAME():
    conn = boto3.client("datapipeline", region_name="us-west-2")
    res = conn.create_pipeline(name="mypipeline", uniqueId="some-unique-id")
    pipeline_id = res["pipelineId"]
    conn.activate_pipeline(pipelineId=pipeline_id)
    pipeline_descriptions = conn.describe_pipelines(pipelineIds=[pipeline_id])[
        "pipelineDescriptionList"
    ]
    assert len(pipeline_descriptions) == 1
    pipeline_description = pipeline_descriptions[0]
    fields = pipeline_description["fields"]
    assert get_value_from_fields("@pipelineState", fields) == "SCHEDULED"