def tx(self, *args, **kwargs):
if <NUM_LIT:0> == len(args): return TX(self) <EOL>ops = []<EOL>for op in args:<EOL><INDENT>if isinstance(op, list):            ops += op<EOL>elif isinstance(op, str): ops.append(op)<EOL><DEDENT>if '<STR_LIT>' in kwargs: pp(ops)<EOL>tx_proc ="<STR_LIT>" % "<STR_LIT>".join(ops)<EOL>x = self.rest('<STR_LIT:POST>', self.uri_db, data={"<STR_LIT>": tx_proc})<EOL>return x<EOL>
Executes a raw tx string, or get a new TX object to work with.

        Passing a raw string or list of strings will immedately transact 
        and return the API response as a dict.
        >>> resp = tx('{:db/id #db/id[:db.part/user] :person/name "Bob"}')
        {db-before: db-after: tempids: }

        This gets a fresh `TX()` to prepare a transaction with.
        >>> tx = db.tx()

        New `E()` object with person/fname and person/lname attributes
        >>> person = tx.add('person/',   {'fname':'John', 'lname':'Doe'})

        New state and city objects referencing the state
        >>> state  = tx.add('loc/state', 'WA')
        >>> city   = tx.add('loc/city',  'Seattle', 'isin', state)

        Add person/city, person/state, and person/likes refs to the person entity
        >>> person.add('person/', {'city': city, 'state': state, 'likes': [city, state]})

        Excute the transaction
        >>> resp = tx.tx()        

        The resolved entity ids for our person
        >>> person.eid, state.eid, city.eid

        Fetch all attributes, behave like a dict
        >>> person.items()
        >>> person.iteritems()

        Access attribute as an attribute
        >>> person['person/name']

        See `TX()` for options.