def extend_params(params, more_params):
  """Extends dictionary with new values.

  Args:
    params: A dictionary
    more_params: A dictionary

  Returns:
    A dictionary which combines keys from both dictionaries.

  Raises:
    ValueError: if dicts have the same key.
  """
  for yak in more_params:
    if yak in params:
      raise ValueError('Key "%s" is already in dict' % yak)
  params.update(more_params)
  return params