code: def primal_name(func, wrt):
    
    if not isinstance(func, types.FunctionType):
      raise TypeError(func)
    varnames = six.get_function_code(func).co_varnames
    return PRIMAL_NAME.format(func.__name__, ''.join(varnames[i] for i in wrt))
docs: Name for the primal of a function.