code: def round_seq(seq, ndigits):
      """Rounds a nested sequence of floats to ndigits precision.
      Useful for rounding tensors serialized with .tolist()
      """
      return type(seq)(
          recursive_map(seq, lambda item: round(item, ndigits))
      )
  
imports: from collections.abc import Sequence
label_desc: Use image node_id 4 for calling a global function with example usage: round_seq(seq, ndigits) and returns: type