code: def slice_config(config, key):
      
      if key:
          keys = key.split('.')
          for k in keys:
              config = config[k]
  
      return config
docs: Slice config for printing as defined in key.
  
      :param ConfigManager config: configuration dictionary
      :param str key: dotted key, by which config should be sliced for printing
  
      :returns: sliced config
      :rtype: dict