docstr: Reject duplicate keys.
docstr_tok: ["Reject","duplicate","keys","."]
code: def dict_raise_on_duplicates(self, ordered_pairs):
      """Reject duplicate keys."""
      d = {}
      for k, v in ordered_pairs:
          if k in d:
              raise ValueError("duplicate key: %r" % (k,))
          else:
              d[k] = v
      return d
  
file_path: flask-restplus/tests/conftest.py
imports: from __future__ import unicode_literals
  import json
  import pytest
  from flask import Flask, Blueprint
  from flask.testing import FlaskClient
  import flask_restplus
label_desc: Use image node_id 1 for calling the TestClient obj's underlying member method code with example usage: obj.dict_raise_on_duplicates(ordered_pairs) and returns: d