import _ast


def Dict(keys=(), values=()):
  """Creates an _ast.Dict node. This represents a dict literal.

  Args:
    keys: A list of keys as nodes. Must be the same length as values.
    values: A list of values as nodes. Must be the same length as values.

  Raises:
    ValueError: If len(keys) != len(values).

  Returns:
    An _ast.Dict node.
  """
  if len(keys) != len(values):
    raise ValueError(
        'len(keys)={} != len(values)={}'.format(len(keys), len(values)))
  return _ast.Dict(list(keys), list(values))