code: def unique_segment(data, dtype="int64"):
      """Return Segment Id from data"""
      unique, index = paddle.unique(
          data, return_inverse=True, dtype=dtype
      )
      return unique, index
  
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 6 for calling a global function with example usage: unique_segment(data, dtype) and returns: unique,  index