<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def primal_name(func, wrt):
 """Name for the primal of a function."""

  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))