def _update_kwargs_with_warning(kwargs, extra_args, conflict_args=None):
  """Updates `kwargs` with `extra_args`; crashes if `conflict_args` changed."""
  for k, v in extra_args.items():
    if k in kwargs:
      if conflict_args is not None and k in conflict_args and kwargs[k] != v:
        raise ValueError(
            'The extra_args "{}" might have conflicts with other flags. '
            'See '
            'https://github.com/google/deepvariant/blob/r1.2/docs/'
            'deepvariant-pacbio-model-case-study.md#clarification-'
            'of-the---use_hp_information-flag '
            'for an explanation, or report this issue on '
            'https://github.com/google/deepvariant/issues.'.format(k))
      if kwargs[k] != v:
        print('\nWarning: --{} is previously set to {}, now to {}.'.format(
            k, kwargs[k], v))
    kwargs[k] = v
  return kwargs