code: def expr(obj, simplify=True):
      
      if isinstance(obj, Expression):
          return obj
      # False, True, 0, 1
      elif isinstance(obj, int) and obj in {0, 1}:
          return _CONSTS[obj]
      elif isinstance(obj, str):
          ast = pyeda.parsing.boolexpr.parse(obj)
          ex = ast2expr(ast)
          if simplify:
              ex = ex.simplify()
          return ex
      else:
          return One if bool(obj) else Zero
docs: Convert an arbitrary object into an Expression.