code: def coerce_col_safe(s, to_dtype):
      if s.dtype.name == to_dtype.name:
          return s
      if to_dtype.name == "int64":
          return s.fillna(0).astype("int64")
      if to_dtype.name == "timedelta64[ns]":
          return s.fillna(np.datetime64("NAT")).astype(str)
      logger.debug("CEORCING %s :: %s -> %s", s.name, s.dtype, to_dtype)
      return s.astype(to_dtype)
  
imports: from typing import TYPE_CHECKING, Any, Dict, List, Optional
  from .Engine import Engine, DataframeLike, DataframeLocalLike
  import numpy, pandas, pyarrow, sys
  from .util import setup_logger
label_desc: Use image node_id 4 for calling a global function with example usage: coerce_col_safe(s, to_dtype) and returns: s, s, s, s