def is_mul(var):
 if (var.owner and (var.owner.op == tensor.mul)):
  return var.owner.inputs
 else:
  return None

def is_mul ( var ) : if ( var . owner and ( var . owner . op == tensor . mul ) ) : return var . owner . inputs else : return None
match a variable with x * y * z * .