def __new__(cls, op, args, add_variables=None, hash=None, **kwargs): 
<EOL>a_args = args if type(args) is tuple else tuple(args)<EOL>need_symbolic = '<STR_LIT>' not in kwargs<EOL>need_variables = '<STR_LIT>' not in kwargs<EOL>need_errored = '<STR_LIT>' not in kwargs<EOL>args_have_annotations = None<EOL>arg_max_depth = <NUM_LIT:0><EOL>if need_symbolic or need_variables or need_errored:<EOL><INDENT>symbolic_flag = False<EOL>variables_set = set()<EOL>errored_set = set()<EOL>for a in a_args:<EOL><INDENT>if not isinstance(a, Base): continue<EOL>if need_symbolic and not symbolic_flag: symbolic_flag |= a.symbolic<EOL>if need_variables: variables_set |= a.variables<EOL>if need_errored: errored_set |= a._errored<EOL>if args_have_annotations is not True:<EOL><INDENT>args_have_annotations = args_have_annotations or bool(a.annotations)<EOL><DEDENT>if arg_max_depth < a.depth: arg_max_depth = a.depth<EOL><DEDENT>if need_symbolic: kwargs['<STR_LIT>'] = symbolic_flag<EOL>if need_variables: kwargs['<STR_LIT>'] = frozenset(variables_set)<EOL>if need_errored: kwargs['<STR_LIT>'] = errored_set<EOL><DEDENT>if type(kwargs['<STR_LIT>']) is not frozenset:  <EOL><INDENT>kwargs['<STR_LIT>'] = frozenset(kwargs['<STR_LIT>'])<EOL><DEDENT>if add_variables:<EOL><INDENT>kwargs['<STR_LIT>'] = kwargs['<STR_LIT>'] | add_variables<EOL><DEDENT>eager_backends = list(backends._eager_backends) if '<STR_LIT>' not in kwargs else kwargs['<STR_LIT>']<EOL>if not kwargs['<STR_LIT>'] and eager_backends is not None and op not in operations.leaf_operations:<EOL><INDENT>for eb in eager_backends:<EOL><INDENT>try:<EOL><INDENT>r = operations._handle_annotations(eb._abstract(eb.call(op, args)), args)<EOL>if r is not None:<EOL><INDENT>return r<EOL><DEDENT>else:<EOL><INDENT>eager_backends.remove(eb)<EOL><DEDENT><DEDENT>except BackendError:<EOL><INDENT>eager_backends.remove(eb)<EOL><DEDENT><DEDENT><DEDENT>kwargs['<STR_LIT>'] = None<EOL>if '<STR_LIT>' not in kwargs:<EOL><INDENT>kwargs['<STR_LIT>'] = None<EOL><DEDENT>if '<STR_LIT>' not in kwargs:<EOL><INDENT>kwargs['<STR_LIT>'] = None<EOL><DEDENT>if '<STR_LIT>' not in kwargs:<EOL><INDENT>kwargs['<STR_LIT>'] = ()<EOL><DEDENT>h = Base._calc_hash(op, a_args, kwargs) if hash is None else hash<EOL>self = cls._hash_cache.get(h, None)<EOL>if self is None:<EOL><INDENT>self = super(Base, cls).__new__(cls)<EOL>depth = arg_max_depth + <NUM_LIT:1><EOL>self.__a_init__(op, a_args, depth=depth, args_have_annotations=args_have_annotations, **kwargs)<EOL>self._hash = h<EOL>cls._hash_cache[h] = self<EOL><DEDENT>return self<EOL>
This is called when you create a new Base object, whether directly or through an operation.
It finalizes the arguments (see the _finalize function, above) and then computes
a hash. If an AST of this hash already exists, it returns that AST. Otherwise,
it creates, initializes, and returns the AST.

:param op:              The AST operation ('__add__', 'Or', etc)
:param args:            The arguments to the AST operation (i.e., the objects to add)
:param variables:       The symbolic variables present in the AST (default: empty set)
:param symbolic:        A flag saying whether or not the AST is symbolic (default: False)
:param length:          An integer specifying the length of this AST (default: None)
:param simplified:      A measure of how simplified this AST is. 0 means unsimplified, 1 means fast-simplified
                        (basically, just undoing the Reverse op), and 2 means simplified through z3.
:param errored:         A set of backends that are known to be unable to handle this AST.
:param eager_backends:  A list of backends with which to attempt eager evaluation
:param annotations:     A frozenset of annotations applied onto this AST.