code: def _assemble_from_unit_mappings(arg, errors, box, tz):
      """
      assemble the unit specified fields from the arg (DataFrame)
      Return a Series for actual parsing
  
      Parameters
      ----------
      arg : DataFrame
      errors : {'ignore', 'raise', 'coerce'}, default 'raise'
  
          - If 'raise', then invalid parsing will raise an exception
          - If 'coerce', then invalid parsing will be set as NaT
          - If 'ignore', then invalid parsing will return the input
      box : boolean
  
          - If True, return a DatetimeIndex
          - If False, return an array
      tz : None or 'utc'
  
      Returns
      -------
      Series
      """
      from pandas import to_timedelta, to_numeric, DataFrame
  
      arg = DataFrame(arg)
      if not arg.columns.is_unique:
          raise ValueError("cannot assemble with duplicate keys")
  
      # replace passed unit with _unit_map
      def f(value):
          if value in _unit_map:
              return _unit_map[value]
  
          # m is case significant
          if value.lower() in _unit_map:
              return _unit_map[value.lower()]
  
          return value
  
      unit = {k: f(k) for k in arg.keys()}
      unit_rev = {v: k for k, v in unit.items()}
  
      # we require at least Ymd
      required = ["year", "month", "day"]
      req = sorted(list(set(required) - set(unit_rev.keys())))
      if len(req):
          raise ValueError(
              "to assemble mappings requires at least that "
              "[year, month, day] be specified: [{required}] "
              "is missing".format(required=",".join(req))
          )
  
      # keys we don't recognize
      excess = sorted(
          list(set(unit_rev.keys()) - set(_unit_map.values()))
      )
      if len(excess):
          raise ValueError(
              "extra keys have been passed "
              "to the datetime assemblage: "
              "[{excess}]".format(excess=",".join(excess))
          )
  
      def coerce(values):
          # we allow coercion to if errors allows
          values = to_numeric(values, errors=errors)
  
          # prevent overflow in case of int8 or int16
          if is_integer_dtype(values):
              values = values.astype("int64", copy=False)
          return values
  
      values = (
          coerce(arg[unit_rev["year"]]) * 10000
          + coerce(arg[unit_rev["month"]]) * 100
          + coerce(arg[unit_rev["day"]])
      )
      try:
          values = to_datetime(
              values, format="%Y%m%d", errors=errors, utc=tz
          )
      except (TypeError, ValueError) as e:
          raise ValueError(
              "cannot assemble the "
              "datetimes: {error}".format(error=e)
          )
  
      for u in ["h", "m", "s", "ms", "us", "ns"]:
          value = unit_rev.get(u)
          if value is not None and value in arg:
              try:
                  values += to_timedelta(
                      coerce(arg[value]), unit=u, errors=errors
                  )
              except (TypeError, ValueError) as e:
                  raise ValueError(
                      "cannot assemble the datetimes [{value}]: "
                      "{error}".format(value=value, error=e)
                  )
      if not box:
          return values.values
      return values
  
imports: from datetime import datetime, time
  from functools import partial
  import numpy
  from pandas._libs import tslib, tslibs
  from pandas._libs.tslibs import Timestamp, conversion, parsing
  from pandas._libs.tslibs.parsing import DateParseError, _format_is_iso, _guess_datetime_format, parse_time_string
  from pandas._libs.tslibs.strptime import array_strptime
  from pandas.compat import zip
  from pandas.core.dtypes.common import ensure_object, is_datetime64_dtype, is_datetime64_ns_dtype, is_datetime64tz_dtype, is_float, is_integer, is_integer_dtype, is_list_like, is_numeric_dtype, is_object_dtype, is_scalar
  from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCSeries
  from pandas.core.dtypes.missing import notna
  from pandas import compat
  from pandas.core import algorithms
label_desc: Use image node_id 8 for calling a global function with example usage: _assemble_from_unit_mappings(arg, errors, box, tz) and returns: values, value, values, values, _unit_map, _unit_map