code: def flatten_spatial_col(
      df: pd.DataFrame, col: str
  ) -> pd.DataFrame:  # noqa: C901
      out_df: pd.DataFrame = df.copy(deep=False)  # type: ignore
  
      ####
  
      for prop in [
          "x",
          "y",
          "z",
          "srid",
          "longtitude",
          "latitude",
          "height",
      ]:
          try:
              # v4.x + v5.x
              s = df[col].apply(lambda v: getattr(v, prop, None))  # type: ignore
              if len(s.dropna()) > 0:
                  out_df[f"{col}_{prop}"] = s
          except:
              continue
  
      ###
  
      out_df[col] = df[col].apply(str)
  
      return out_df
  
file_path: pygraphistry/graphistry/bolt_util.py
imports: import pandas
  from datetime import datetime
  from .pygraphistry import util
  from .util import setup_logger
label_desc: Use image node_id 4 for calling a global function with example usage: flatten_spatial_col(df, col) and returns: out_df