code: def datetime_round(dt, freq):
      """
      round down Timestamp series to a specified freq
      """
      if not freq.is_absolute():
          raise ValueError("Unit is relative")
  
      # TODO: multitemporal units
      all_units = list(freq.times.keys())
      if len(all_units) == 1:
          unit = all_units[0]
          value = freq.times[unit]
          if unit == "m":
              unit = "t"
          # No support for weeks in datetime.datetime
          if unit == "w":
              unit = "d"
              value = value * 7
          freq = str(value) + unit
          return dt.dt.floor(freq)
      else:
          assert "Frequency cannot have multiple temporal parameters"
  
imports: import logging
  import os
  import typing
  import warnings
  from datetime import datetime
  from functools import wraps
  import numpy
  import pandas
  import psutil
  from woodwork.logical_types import Datetime, Double
  from featuretools.entityset.relationship import RelationshipPath
  from featuretools.feature_base import AggregationFeature, DirectFeature
  from featuretools.utils import Trie
  from featuretools.utils.gen_utils import Library, import_or_none, is_instance
  from featuretools.utils.wrangle import _check_time_type, _check_timedelta
label_desc: Use image node_id 3 for calling a global function with example usage: datetime_round(dt, freq) and returns: dt