<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_temp_grad(node, namer, tangent=False):
 """Create a variable to store partial gradients. Args: node: See `create_grad`. namer: See `create_grad`. tangent: See `create_grad`. Returns: node: See `create_grad`. Returns a node representing the partial gradient. Note that this is always a simple variable e.g. the temporary partial of `x[i]` can be something like `_dxi`. Nodes are given an annotation `temp_adjoint_var`. """

  if not isinstance(node, (gast.Subscript, gast.Name)):
    raise TypeError

  def _name_temp_grad(node):
    name = namer.temp_grad(node.id, tangent)
    temp_node = gast.Name(id=name, annotation=None, ctx=None)
    return temp_node
  if isinstance(node, gast.Subscript):
    temp_node = _name_temp_grad(node.value)
  else:
    temp_node = _name_temp_grad(node)
  anno.setanno(temp_node, 'temp_adjoint_var', node)
  return temp_node