code: def _dot_to_json(key: Any, value: Any) -> Any:
      json_output: Any = {}
      path = key.split(".")
      target = reduce(
          lambda d, k: d.setdefault(k, {}), path[:-1], json_output
      )
      target[path[-1]] = value
      return json_output
  
imports: import base64
  import json
  import operator
  import re
  from argparse import Namespace
  from collections import OrderedDict
  from functools import reduce
  from pathlib import Path
  from typing import IO, Any, Dict, Iterable, List, Optional, Tuple, Union
  from termcolor import colored
  import determined.cli.render
  from determined import cli
  from determined.cli import render
  from determined.common import api, context, declarative_argparse, util
  from determined.common.api import authentication
  from determined.util import merge_dicts
label_desc: Use image node_id 7 for calling a global function with example usage: _dot_to_json(key, value) and returns: json_output