code: def test_description_auto_caption_metadata(trans_feat, tmp_path):
      feature_descriptions = {
          "customers: cancel_date": "the date the customer cancelled"
      }
      primitive_templates = {"year": "the year that {} occurred"}
      metadata_graph = graph_feature(
          trans_feat,
          description=True,
          feature_descriptions=feature_descriptions,
          primitive_templates=primitive_templates,
      ).source
  
      metadata_label = 'label="The year that the date the customer cancelled occurred."'
      assert metadata_label in metadata_graph
  
      metadata = {
          "feature_descriptions": feature_descriptions,
          "primitive_templates": primitive_templates,
      }
      metadata_path = os.path.join(
          tmp_path, "description_metadata.json"
      )
      with open(metadata_path, "w") as f:
          json.dump(metadata, f)
      json_metadata_graph = graph_feature(
          trans_feat,
          description=True,
          metadata_file=metadata_path,
      ).source
      assert metadata_label in json_metadata_graph
  
imports: import json
  import os
  import re
  import graphviz
  import pytest
  from featuretools.feature_base import AggregationFeature, DirectFeature, FeatureOutputSlice, GroupByTransformFeature, IdentityFeature, TransformFeature, graph_feature
  from featuretools.primitives import Count, CumMax, Mode, NMostCommon, Year
label_desc: Use image node_id 16 for calling a global function with example usage: test_description_auto_caption_metadata(trans_feat, tmp_path) without return types