code: def merge_config(original: Optional[Dict[str, Any]],
                   overrides: Optional[Dict[str, Any]]) -> Dict[str, Any]:
      
      assert check_argument_types()
      copied = original.copy() if original else {}
      if overrides:
          for key, value in overrides.items():
              if '.' in key:
                  key, rest = key.split('.', 1)
                  value = {rest: value}
  
              orig_value = copied.get(key)
              if isinstance(orig_value, dict) and isinstance(value, dict):
                  copied[key] = merge_config(orig_value, value)
              else:
                  copied[key] = value
  
      return copied
docs: Return a copy of the ``original`` configuration dictionary, with overrides from ``overrides``
      applied.
  
      This similar to what :meth:`dict.update` does, but when a dictionary is about to be
      replaced with another dictionary, it instead merges the contents.
  
      If a key in ``overrides`` is a dotted path (ie. ``foo.bar.baz: value``), it is assumed to be a
      shorthand for ``foo: {bar: {baz: value}}``.
  
      :param original: a configuration dictionary (or ``None``)
      :param overrides: a dictionary containing overriding values to the configuration (or ``None``)
      :return: the merge result