def METHOD_NAME():
    @daily_partitioned_config(
        start_date="2021-05-05",
        tags_for_partition_fn=lambda start, end: {"foo": start.strftime("%Y-%m-%d")},
    )
    def my_daily_partitioned_config(_start, _end):
        return RUN_CONFIG
    assert my_daily_partitioned_config(None, None) == RUN_CONFIG
    @job(config=my_daily_partitioned_config)
    def my_job():
        my_op()
    freeze_datetime = create_pendulum_time(
        year=2021, month=5, day=6, hour=23, minute=59, second=59, tz="UTC"
    )
    partition_keys = my_daily_partitioned_config.get_partition_keys(freeze_datetime)
    assert len(partition_keys) == 1
    partition_key = partition_keys[0]
    result = my_job.execute_in_process(partition_key=partition_key)
    assert result.success
    assert result.dagster_run.tags["foo"] == "2021-05-05"
    with pytest.raises(DagsterUnknownPartitionError, match="Could not find a partition"):
        result = my_job.execute_in_process(partition_key="doesnotexist")