'Returns the ith argument. Raise a SimProcedureArgumentError if we don\'t have such an argument available.
:param int i: The index of the argument to get
:return: The argument
:rtype: object'

def arg(self, i):

    if self.use_state_arguments:
        r = self.cc.arg(self.state, i)
    else:
        if (i >= len(self.arguments)):
            raise SimProcedureArgumentError(('Argument    %d    does    not    exist.' % i))
        r = self.arguments[i]
    l.debug('returning    argument')
    return r
