code: def compare_pvector(v, other, operator):
      return operator(
          v.tolist(),
          other.tolist() if isinstance(other, PVector) else other,
      )
  
imports: from abc import abstractmethod, ABCMeta
  from ._compat import Sequence, Hashable
  from numbers import Integral
  import operator
  import six
  from pyrsistent._transformations import transform
label_desc: Use image node_id 2 for calling a global function with example usage: compare_pvector(v, other, operator) and returns: operator