def make_argslist(self, a):
    arginfo = inspect.getargspec(a)# ArgInfo(args,varargs,keywords,locals)
    if arginfo[0]:
      args = arginfo[0] # usual case: fixed sequence of positional arguments
    elif arginfo[1]:
      args = [arginfo[1]] # special case: either no arg, or one exception arg
    else:
      args = () # no arguments anywhere, args must have this value
    domains = [ self.module.domains[a][arg]() # evaluate state-dependent domain
                if callable(self.module.domains[a][arg]) 
                else self.module.domains[a][arg] # look up static domain
                for arg in args if a in self.module.domains ]
    combination = self.module.combinations.get(a, 'all')  # default is 'all'
    if combination == 'cases': # as many args as items in smallest domain
      argslists = zip(*domains)
    elif combination == 'all':   # Cartesian product
      argslists = itertools.product(*domains)
    # might be nice to support 'pairwise' also
    # return tuple not list, hashable so it can be key in dictionary 
    # also handle special case (None,) indicates empty argslist in domains
    return tuple([() if x == (None,) else x for x in argslists ])
Assumes offset starts from a properly aligned location
dataset/ETHPy150Open jon-jacky/PyModel/pymodel/ModelProgram.py/ModelProgram.make_argslist--crossover with--dataset/ETHPy150Open numba/numba/numba/targets/base.py/BaseContext.sentry_record_alignment