code: def unique(values, method="tree"):
      """
      Uniques are returned in order of appearance. This does NOT sort.
  
      Parameters
      ----------
      values : 1d array-like
      method : 'shuffle' or 'tree', 'tree' method provide a better performance, 'shuffle'
      is recommended if the number of unique values is very large.
      See Also
      --------
      Index.unique
      Series.unique
  
      Examples
      --------
      >>> import mars.dataframe as md
      >>> import pandas as pd
      >>> md.unique(md.Series([2, 1, 3, 3])).execute()
      array([2, 1, 3])
  
      >>> md.unique(md.Series([2] + [1] * 5)).execute()
      array([2, 1])
  
      >>> md.unique(md.Series([pd.Timestamp('20160101'),
      ...                     pd.Timestamp('20160101')])).execute()
      array(['2016-01-01T00:00:00.000000000'], dtype='datetime64[ns]')
  
      >>> md.unique(md.Series([pd.Timestamp('20160101', tz='US/Eastern'),
      ...                      pd.Timestamp('20160101', tz='US/Eastern')])).execute()
      array([Timestamp('2016-01-01 00:00:00-0500', tz='US/Eastern')],
            dtype=object)
      """
      op = DataFrameUnique(method=method)
      return op(values)
  
file_path: mars/mars/dataframe/reduction/unique.py
imports: import pandas
  import numpy
  from ...None import opcodes
  from ...core import OutputType, ENTITY_TYPE
  from ...tensor.core import TensorOrder
  from ...utils import lazy_import
  from ..initializer import Series
  from .core import DataFrameReductionOperand, DataFrameReductionMixin, CustomReduction
label_desc: Use image node_id 1 for calling a global function with example usage: unique(values, method) and returns: op