def METHOD_NAME():
    @op(required_resource_keys={"prometheus"})
    def prometheus_op(context):
        e = Enum(
            "my_task_state",
            "Description of enum",
            states=["starting", "running", "stopped"],
            registry=context.resources.prometheus.registry,
        )
        # no idea why pylint doesn't like this line, it's correct
        e.state("running")
        metric = None
        for metric in context.resources.prometheus.registry.collect():
            if metric.name == "my_task_state":
                break
        assert metric and metric.samples[0].labels == {"my_task_state": "starting"}
    assert wrap_op_in_graph_and_execute(prometheus_op, run_config=ENV, resources=RESOURCES).success