code: def nested_lod_reset(data, reset_index):
      """Reset the lod information as the one in given reset_index.
  
      This function apply :code:`fluid.layers.lod_reset` recursively
      to all the tensor in nested data.
  
      Args:
          data: A dictionary of tensor or tensor.
          reset_index: A variable which the target lod information comes from.
  
      Return:
          Return a dictionary of LodTensor of LodTensor.
  
      """
      if data is None:
          return None
      elif isinstance(data, dict):
          new_data = {}
          for key, value in data.items():
              new_data[key] = nested_lod_reset(value, reset_index)
          return new_data
      else:
          return fluid.layers.lod_reset(data, reset_index)
  
file_path: PGL/legacy/pgl/utils/op.py
imports: import numpy
  import paddle.fluid
  from pgl.utils import paddle_helper
label_desc: Use image node_id 1 for calling a global function with example usage: nested_lod_reset(data, reset_index) and returns: None, new_data, fluid