class_docstr: A logical variable with a constraint.
  
  These will unify with other `Var`s regardless of the constraints.
class_docstr_tok: ["A","logical","variable","with","a","constraint",".","These","will","unify","with","other","`","Var","`","s","regardless","of","the","constraints","."]
code: def __new__(cls, constraint, token=None, prefix=""):
      if token is None:
          token = f"{prefix}_{Var._id}"
          Var._id += 1
  
      key = (token, constraint)
      obj = cls._refs.get(key, None)
  
      if obj is None:
          obj = object.__new__(cls)
          obj.token = token
          obj.constraint = constraint
          cls._refs[key] = obj
  
      return obj
  
imports: from collections.abc import Mapping
  from numbers import Number
  from typing import Optional, Union
  import numpy
  from cons.core import ConsError, _car, _cdr
  from etuples import apply, etuple, etuplize
  from etuples.core import ExpressionTuple
  from unification.core import _unify, assoc
  from unification.utils import transitive_get
  from unification.variable import Var, isvar, var
  from pytensor.graph.basic import Constant, Variable
  from pytensor.graph.op import Op
  from pytensor.graph.type import Type
label_desc: Use image node_id 1 for calling the ConstrainedVar obj's underlying member method code with example usage: obj.__new__(cls, constraint, token, prefix) and returns: obj