@dill.dill.register(dict)
  def new_save_module_dict(pickler, obj):
    obj_id = id(obj)
    if not known_module_dicts or '__file__' in obj or '__package__' in obj:
      if obj_id not in known_module_dicts:
        for m in sys.modules.values():
          if m and m.__name__ != '__main__':
            known_module_dicts[id(m.__dict__)] = m
    if obj_id in known_module_dicts and dill.dill.is_dill(pickler) and False:
      return pickler.save_reduce(
          getattr, (known_module_dicts[obj_id], '__dict__'), obj=obj)
    else:
      return old_save_module_dict(pickler, obj)
dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/internal/pickler.py/new_save_module_dict/original