code: def lod_reset(x, y=None, target_lod=None):
      """lod_reset"""
      check_variable_and_dtype(
          x, "x", ["float32", "float64", "int32", "int64"], "lod_reset"
      )
      h = LayerHelper("lod_reset", **locals())
      out = h.create_variable_for_type_inference(dtype=x.dtype)
      if y is not None:
          check_type(y, "y", (Variable), "lod_reset")
          # TODO: check y.lod_level = 0 dtype
          h.append_op(
              type="lod_reset",
              inputs={"X": x, "Y": y},
              outputs={"Out": out},
          )
      elif target_lod is not None:
          h.append_op(
              type="lod_reset",
              inputs={"X": x},
              attrs={"target_lod": target_lod},
              outputs={"Out": out},
          )
      else:
          raise ValueError("y and target_lod should not be both none.")
      return out
  
imports: import os
  import sys
  import math
  import time
  import numpy
  import pickle
  import paddle
  import paddle.fluid
  import paddle.fluid.layers
  import paddle.static
  from paddle.common_ops_import import LayerHelper, check_type, check_variable_and_dtype
  from paddle.fluid.framework import Variable
  import pgl
  from pgl.utils.logger import log
label_desc: Use image node_id 16 for calling a global function with example usage: lod_reset(x, y, target_lod) and returns: out