code: def get_dcn_model(schema, args, prediction_tasks):
      # Keeping only categorical features and removing the user id (keeping only seq features)
      # schema_selected = schema.select_by_tag(Tags.CATEGORICAL).remove_by_tag(Tags.USER_ID)
  
      input_block = mm.InputBlockV2(
          schema,
          categorical=mm.Embeddings(
              schema.select_by_tag(Tags.CATEGORICAL),
              embeddings_regularizer=regularizers.l2(
                  args.embeddings_l2_reg
              ),
              infer_dim_fn=partial(
                  infer_embedding_dim,
                  multiplier=args.embedding_sizes_multiplier,
              ),
          ),
          aggregation="concat",
      )
  
      model = mm.DCNModel(
          schema,
          input_block=input_block,
          depth=args.dcn_interacted_layer_num,
          deep_block=mm.MLPBlock(
              args.mlp_layers,
              activation=args.activation,
              kernel_initializer=args.mlp_init,
              dropout=args.dropout,
              kernel_regularizer=regularizers.l2(args.l2_reg),
              bias_regularizer=regularizers.l2(args.l2_reg),
          ),
          prediction_tasks=prediction_tasks,
      )
  
      return model
  
file_path: Merlin/examples/quick_start/scripts/ranking/ranking_models.py
imports: from functools import partial
  import merlin.models.tf
  from merlin.models.tf import Model
  from merlin.models.utils.schema_utils import infer_embedding_dim
  from merlin.schema.tags import Tags
  from tensorflow.keras import regularizers
label_desc: Use image node_id 3 for calling a global function with example usage: get_dcn_model(schema, args, prediction_tasks) and returns: model