code: def test_simplify_uop(self):
      def helper_test_simplify(uop, dtype, vin, arg=None):
          ast = LazyOp(
              BufferOps.CONST,
              (),
              ConstBuffer(
                  42,
                  dtypes.float,
                  ShapeTracker(
                      views=(
                          View(
                              shape=(),
                              strides=(),
                              offset=0,
                              mask=None,
                              contiguous=True,
                          ),
                      )
                  ),
              ),
          )
          ast = LazyOp(
              BufferOps.STORE,
              (ast,),
              MemBuffer(
                  0,
                  dtypes.float,
                  ShapeTracker(
                      views=(
                          View(
                              shape=(),
                              strides=(),
                              offset=0,
                              mask=None,
                              contiguous=True,
                          ),
                      )
                  ),
              ),
          )
          lin = Linearizer(ast=ast)  # this is a dummy ast
  
          lin.uops = []
          return lin.uop(uop, dtype, vin, arg, cachable=False)
  
      c0 = UOp(UOps.CONST, dtypes.float, vin=(), arg=0.0)
      assert (
          helper_test_simplify(
              UOps.ALU,
              dtypes.float,
              vin=(
                  UOp(UOps.CONST, dtypes.bool, vin=(), arg=True),
                  c0,
                  c0,
              ),
              arg=TernaryOps.WHERE,
          )
          == c0
      )
  
      c0 = UOp(UOps.CONST, dtypes.float, vin=(), arg=0.0)
      c1 = UOp(UOps.CONST, dtypes.float, vin=(), arg=1.0)
      assert (
          helper_test_simplify(
              UOps.ALU,
              dtypes.float,
              vin=(
                  UOp(UOps.CONST, dtypes.bool, vin=(), arg=True),
                  c0,
                  c1,
              ),
              arg=TernaryOps.WHERE,
          ).uop
          == UOps.ALU
      )
  
imports: import numpy
  import unittest, os
  from tinygrad.codegen.kernel import Opt, OptOps, tensor_cores
  from tinygrad.codegen.linearizer import Linearizer, UOp, UOps, expand_node
  from tinygrad.device import Compiled, Device, Buffer
  from tinygrad.ops import BufferOps, MemBuffer, ConstBuffer, LazyOp, LoadOps, TernaryOps
  from tinygrad.shape.shapetracker import ShapeTracker
  from tinygrad.shape.view import View
  from tinygrad.shape.symbolic import MulNode, SumNode, Variable, NumNode, Node, create_rednode
  from tinygrad.tensor import Tensor
  from tinygrad.jit import CacheCollector
  from tinygrad.realize import run_schedule
  from tinygrad.helpers import prod
  from tinygrad.dtype import dtypes
label_desc: Use image node_id 10 for calling the TestLinearizer obj's underlying member method code with example usage: obj.test_simplify_uop() and returns: lin