def METHOD_NAME():
    farmbeats_endpoint = os.environ['FARMBEATS_ENDPOINT']
    credential = DefaultAzureCredential()
    client = FarmBeatsClient(
        endpoint=farmbeats_endpoint,
        credential=credential
    )
    party_id = f"contoso-party-{random.randint(0,1000)}"
    boundary_id = "contoso-boundary"
    job_id_prefix = "contoso-job"
    start_date_time = datetime(2020, 1, 1, tzinfo=UTC)
    end_date_time = datetime(2020, 1, 31, tzinfo=UTC)
    data_root_dir = "./data"
    # Create or update a party within FarmBeats.
    print(
        f"Ensure party with id {party_id} exists... ", end="", flush=True)
    party = client.parties.create_or_update(
        party_id=party_id,
        party={}
    )
    print("Done")
    # Create a boundary if the boundary does not exist.
    try:
        print(
            f"Checking if boundary with id {boundary_id} exists... ", end="", flush=True)
        boundary = client.boundaries.get(
            party_id=party_id,
            boundary_id=boundary_id
        )
        print("Exists")
    except ResourceNotFoundError as e:
        print("Boundary doesn't exist. Creating... ", end="", flush=True)
        # Creating a boundary.
        boundary = client.boundaries.create_or_update(
            party_id=party_id,
            boundary_id=boundary_id,
            boundary={
                "geometry":
                {
                    "type": "Polygon",
                    "coordinates":
                        [
                            [
                                [73.70457172393799, 20.545385304358106],
                                [73.70457172393799, 20.545385304358106],
                                [73.70448589324951, 20.542411534243367],
                                [73.70877742767334, 20.541688176010233],
                                [73.71023654937744, 20.545083911372505],
                                [73.70663166046143, 20.546992723579137],
                                [73.70457172393799, 20.545385304358106],
                            ]
                        ]
                },
                "status": "<string>",
                "name": "<string>",
                "description": "<string>"
            }
        )
        print("Created")
    # Queue a satellite job and wait for completion.
    job_id = f"{job_id_prefix}-{randint(0, 1000)}"
    print(f"Queuing satellite job {job_id}... ", end="", flush=True)
    satellite_job_poller = client.scenes.begin_create_satellite_data_ingestion_job(
        job_id=job_id,
        job={
            "boundaryId": boundary_id,
            "endDateTime": end_date_time,
            "partyId": party_id,
            "startDateTime": start_date_time,
            "provider": "Microsoft",
            "source": "Sentinel_2_L2A",
            "data": {
                "imageNames": [
                    "NDVI"
                ],
                "imageFormats": [
                    "TIF"
                ],
                "imageResolution": [10]
            },
            "name": "<string>",
            "description": "<string>"
        }
    )
    print("Queued. Waiting for completion... ", end="", flush=True)
    satellite_job_poller.result()
    print(f"Job completed with status {satellite_job_poller.status()}")
    # Get scenes which are available in FarmBeats for our party and boundary of intrest.
    print("Getting scenes list... ", end="", flush=True)
    scenes = client.scenes.list(
        party_id=party_id,
        boundary_id=boundary_id,
        start_date_time=start_date_time,
        end_date_time=end_date_time,
        provider="Microsoft",
        source="Sentinel_2_L2A"
    )
    print("Done")        
    for scene in scenes:
        for image_file in scene["imageFiles"]:
            download_image(client, image_file["fileLink"], data_root_dir)
    print("Downloads done")