code: def _round_floats_for_logging(
      item: Any, decimal_places: int = 2
  ) -> Any:
      """Round a number or numbers in a mapping to a given number of decimal places.
      If item or values in dictionary is not a number, returns it as it.
      """
      if isinstance(item, float):
          return round(item, decimal_places)
      elif isinstance(item, dict):
          return {
              k: _round_floats_for_logging(
                  item=v, decimal_places=decimal_places
              )
              for k, v in item.items()
          }
      elif isinstance(item, list):
          return [
              _round_floats_for_logging(
                  item=i, decimal_places=decimal_places
              )
              for i in item
          ]
      elif isinstance(item, tuple):
          return tuple(
              _round_floats_for_logging(
                  item=i, decimal_places=decimal_places
              )
              for i in item
          )
      return item
  
imports: import logging
  import os
  import re
  from functools import wraps
  from typing import Any, Callable, Iterable, List, TypeVar
  from ax.utils.common.decorator import ClassDecorator
label_desc: Use image node_id 5 for calling a global function with example usage: _round_floats_for_logging(item, decimal_places) and returns: item, round, unknown, unknown, tuple