code: def _assign_properties(prop, anomaly, default=None):
      "Expand the tree structure of `prop` to that of `anomaly`"
      if (not isinstance(prop, dict)) and isinstance(
          anomaly, (dict, pd.DataFrame)
      ):
          return {
              key: _assign_properties(prop, anomaly[key])
              for key in (
                  anomaly.keys()
                  if isinstance(anomaly, dict)
                  else anomaly.columns
              )
          }
      elif (not isinstance(prop, dict)) and (
          not isinstance(anomaly, (dict, pd.DataFrame))
      ):
          return prop
      elif isinstance(prop, dict) and (
          not isinstance(anomaly, (dict, pd.DataFrame))
      ):
          raise ValueError(
              "Property dict and anomaly dict are inconsistent."
          )
      else:  # isinstance(prop, dict) & isinstance(anomaly, (dict, pd.DataFrame))
          if set(prop.keys()) <= set(
              anomaly.keys()
              if isinstance(anomaly, dict)
              else anomaly.columns
          ):
              return {
                  key: _assign_properties(
                      (prop[key] if (key in prop.keys()) else default),
                      anomaly[key],
                  )
                  for key in (
                      anomaly.keys()
                      if isinstance(anomaly, dict)
                      else anomaly.columns
                  )
              }
          else:
              raise ValueError(
                  "Property dict and anomaly dict are inconsistent."
              )
  
file_path: adtk/src/adtk/visualization/_visualization.py
imports: import matplotlib.pyplot
  import numpy
  import pandas
  from pandas.plotting import register_matplotlib_converters
  from ..data import to_events, to_labels, validate_events
label_desc: Use image node_id 8 for calling a global function with example usage: _assign_properties(prop, anomaly, default) and returns: unknown, prop, unknown