def METHOD_NAME():
    @op(required_resource_keys={"datahub"})
    def datahub_op(context: OpExecutionContext):
        assert context.resources.datahub is not None
        dataset_properties = DatasetPropertiesClass(
            description="This table stored the canonical User profile",
            customProperties={"governance": "ENABLED"},
        )
        # Construct a MetadataChangeProposalWrapper object.
        metadata_event = MetadataChangeProposalWrapper(
            entityType="dataset",
            changeType=ChangeTypeClass.UPSERT,
            entityUrn=builder.make_dataset_urn("bigquery", "my-project.my-dataset.user-table"),
            aspectName="datasetProperties",
            aspect=dataset_properties,
        )
        context.resources.datahub.emit(metadata_event)
    with responses.RequestsMock() as rsps:
        # Creating the datahub_rest_emitter resource will run the DatahubRestEmitter.test_connection() method.
        # The response needs to be mocked out prior to the resource gets instantiated.
        # This is because creating the resource its the config endpoint as a healthcheck.
        rsps.add(rsps.GET, "http://foobar:8080/config", status=200, json={"noCode": "true"})
        rsps.add(rsps.POST, "http://foobar:8080/aspects?action=ingestProposal", status=200, json={})
        context = build_op_context(
            resources={
                "datahub": datahub_rest_emitter.configured({"connection": "http://foobar:8080"})
            }
        )
        datahub_op(context)