code: def init_ww_and_concat_fm(feature_matrix, ww_init_kwargs):
      cols_to_check = {
          col
          for col, ltype in ww_init_kwargs["logical_types"].items()
          if isinstance(ltype, (Age, Boolean, Integer))
      }
      replacement_type = {
          "age": AgeNullable(),
          "boolean": BooleanNullable(),
          "integer": IntegerNullable(),
      }
      for fm in feature_matrix:
          updated_cols = set()
          for col in cols_to_check:
              # Only convert types for pandas if null values are present
              # Always convert for Dask/Spark to avoid pulling data into memory for null check
              is_pandas_df_with_null = (
                  isinstance(fm, pd.DataFrame)
                  and fm[col].isnull().any()
              )
              is_dask_df = is_instance(fm, dd, "DataFrame")
              is_spark_df = is_instance(fm, ps, "DataFrame")
              if is_pandas_df_with_null or is_dask_df or is_spark_df:
                  current_type = ww_init_kwargs["logical_types"][
                      col
                  ].type_string
                  ww_init_kwargs["logical_types"][
                      col
                  ] = replacement_type[current_type]
                  updated_cols.add(col)
          cols_to_check = cols_to_check - updated_cols
          fm.ww.init(**ww_init_kwargs)
  
      if any(is_instance(fm, dd, "DataFrame") for fm in feature_matrix):
          feature_matrix = dd.concat(feature_matrix)
      elif any(
          is_instance(fm, ps, "DataFrame") for fm in feature_matrix
      ):
          feature_matrix = ps.concat(feature_matrix)
      else:
          feature_matrix = pd.concat(feature_matrix)
  
      feature_matrix.ww.init(**ww_init_kwargs)
      return feature_matrix
  
imports: import logging
  import math
  import os
  import shutil
  import time
  import warnings
  from datetime import datetime
  import cloudpickle
  import numpy
  import pandas
  from woodwork.logical_types import Age, AgeNullable, Boolean, BooleanNullable, Integer, IntegerNullable
  from featuretools.computational_backends.feature_set import FeatureSet
  from featuretools.computational_backends.feature_set_calculator import FeatureSetCalculator
  from featuretools.computational_backends.utils import _check_cutoff_time_type, _validate_cutoff_time, bin_cutoff_times, create_client_and_cluster, gather_approximate_features, gen_empty_approx_features_df, get_ww_types_from_features, save_csv_decorator
  from featuretools.entityset.relationship import RelationshipPath
  from featuretools.feature_base import AggregationFeature, FeatureBase
  from featuretools.utils import Trie
  from featuretools.utils.gen_utils import Library, import_or_none, import_or_raise, is_instance, make_tqdm_iterator
label_desc: Use image node_id 10 for calling a global function with example usage: init_ww_and_concat_fm(feature_matrix, ww_init_kwargs) and returns: feature_matrix