code: def visit_field(rec, field, op):
      # type: (Any, Iterable, Union[Callable[..., Any], partial[Any]]) -> None
      
  
      if isinstance(rec, MutableMapping):
          if field in rec:
              rec[field] = op(rec[field])
          for d in rec:
              visit_field(rec[d], field, op)
      if isinstance(rec, MutableSequence):
          for d in rec:
              visit_field(d, field, op)
docs: Apply a function to mapping with 'field'.