code: def to_paddle_tensor(data, uva=False):
      """Convert a numpy ndarray to paddle.Tensor."""
      if not uva:
          data = paddle.to_tensor(data)
      else:
          if (
              not paddle.device.is_compiled_with_cuda()
              or not paddle.device.get_device().startswith("gpu")
          ):
              raise ValueError(
                  "UVA tensor should be used under GPU environment."
              )
          data = core.to_uva_tensor(data)
      return data
  
file_path: PGL/pgl/utils/helper.py
imports: import numpy
  import paddle
  from paddle.common_ops_import import Variable
  from paddle.framework import core
  from pgl.utils import op
label_desc: Use image node_id 2 for calling a global function with example usage: to_paddle_tensor(data, uva) and returns: data