code: def _serialize_feature_column(
      feature_column: tf.__internal__.feature_column.FeatureColumn,
  ) -> Dict[str, Any]:
      """Serialize the given feature column into a dictionary."""
      if not hasattr(feature_column, "_is_v2_column"):
          raise ValueError(
              "feature_column does not has _is_v2_column attribute"
          )
      if (
          not feature_column._is_v2_column
      ):  # pylint: disable=protected-access
          raise ValueError("feature_column is not a v2 column")
      if isinstance(feature_column, feature_column_v2.NumericColumn):
          return {
              "type": "NumericColumn",
              "key": feature_column.key,
          }
      elif isinstance(
          feature_column, feature_column_v2.BucketizedColumn
      ):
          return {
              "type": "BucketizedColumn",
              "key": feature_column.name,
              "boundaries": feature_column.boundaries,
          }
      elif isinstance(feature_column, feature_column_v2.CrossedColumn):
          return {
              "type": "CrossedColumn",
              "key": feature_column.name,
              "keys": feature_column.keys,
          }
      elif isinstance(
          feature_column, feature_column_v2.HashedCategoricalColumn
      ):
          return {
              "type": "HashCategoricalColumn",
              "key": feature_column.key,
          }
      elif isinstance(
          feature_column, feature_column_v2.IdentityCategoricalColumn
      ):
          return {
              "type": "IdentityCategoricalColumn",
              "key": feature_column.key,
          }
      elif isinstance(
          feature_column,
          feature_column_v2.VocabularyFileCategoricalColumn,
      ):
          return {
              "type": "VocabularyFileCategoricalColumn",
              "key": feature_column.key,
          }
      elif isinstance(
          feature_column,
          feature_column_v2.VocabularyListCategoricalColumn,
      ):
          return {
              "type": "VocabularyListCategoricalColumn",
              "key": feature_column.key,
          }
      elif isinstance(
          feature_column, feature_column_v2.WeightedCategoricalColumn
      ):
          return {
              "type": "WeightedCategoricalColumn",
              "key": feature_column.categorical_column.key,
              "weight_feature_key": feature_column.weight_feature_key,
          }
      elif isinstance(
          feature_column, feature_column_v2.EmbeddingColumn
      ):
          return {
              "type": "EmbeddingColumn",
              "key": feature_column.name,
              "combiner": feature_column.combiner,
              "categorical_column": _serialize_feature_column(
                  feature_column.categorical_column
              ),
          }
      elif isinstance(
          feature_column, feature_column_v2.SharedEmbeddingColumn
      ):
          return {
              "type": "SharedEmbeddingColumn",
              "key": feature_column.name,
              "combiner": feature_column.combiner,
              "categorical_column": _serialize_feature_column(
                  feature_column.categorical_column
              ),
          }
      elif isinstance(
          feature_column, feature_column_v2.IndicatorColumn
      ):
          return {
              "type": "IndicatorColumn",
              "key": feature_column.name,
              "categorical_column": _serialize_feature_column(
                  feature_column.categorical_column
              ),
          }
      else:
          raise ValueError(
              "unknown feature column, type %s, value %s"
              % (type(feature_column), str(feature_column))
          )
  
imports: import contextlib
  import inspect
  import os
  import pickle
  from typing import Any, Callable, Dict, Optional
  import six
  import tensorflow
  from tensorflow import estimator
  import tensorflow_model_analysis
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.utils import util
  from tensorflow.python.feature_column import feature_column_v2
  from tensorflow_estimator.python.estimator.canned import dnn
label_desc: Use image node_id 5 for calling a global function with example usage: _serialize_feature_column(feature_column) and returns: dict, dict, dict, dict, dict, dict, dict, dict, dict, dict, dict