code: def _format_field(
      val: Any,
      precision: Optional[int] = None,
      round_digits: bool = False,
  ) -> str:
      def _format(_val):
          if isinstance(_val, float) and precision:
              if round_digits:
                  return round(_val, precision)
              return _normalize_float(_val, precision)
          if isinstance(_val, abc.Mapping):
              return {k: _format(v) for k, v in _val.items()}
          if isinstance(_val, list):
              return [_format(x) for x in _val]
          return _val
  
      return str(_format(val))
  
imports: from collections import abc
  from itertools import chain, repeat, zip_longest
  from operator import itemgetter
  from typing import TYPE_CHECKING, Any, Dict, ItemsView, Iterable, Iterator, List, Mapping, MutableSequence, Optional, Sequence, Set, Tuple, Union, overload
  from funcy import reraise
label_desc: Use image node_id 3 for calling a global function with example usage: _format_field(val, precision, round_digits) and returns: str, _val, _normalize_float, unknown, unknown, round