Returns the number of elements that the instruction *op* adds to the stack.

  # Arguments
  op (dis.Instruction): The instruction to retrieve the stackdelta value for.

  # Raises
  KeyError: If the instruction *op* is not supported.

def get_stackdelta(op):
  """
  Returns the number of elements that the instruction *op* adds to the stack.

  # Arguments
  op (dis.Instruction): The instruction to retrieve the stackdelta value for.

  # Raises
  KeyError: If the instruction *op* is not supported.
  """

  res = opstackd[op.opname]
  if callable(res):
    res = res(op)
  return res