code: def set_fields(dct, bases, name):
      dct[name] = dict(
          sum(
              [list(b.__dict__.get(name, {}).items()) for b in bases],
              [],
          )
      )
  
      for k, v in list(dct.items()):
          if isinstance(v, _PField):
              dct[name][k] = v
              del dct[k]
  
imports: from pyrsistent._checked_types import CheckedPMap, CheckedPSet, CheckedPVector, CheckedType, InvariantException, _restore_pickle, get_type, maybe_parse_user_type, maybe_parse_many_user_types
  from pyrsistent._checked_types import optional
  from pyrsistent._checked_types import wrap_invariant
  import inspect
label_desc: Use image node_id 1 for calling a global function with example usage: set_fields(dct, bases, name) without return types