code: def invert_unique(d, check=True):
      """
      Invert a dictionary with unique values into a dictionary with (k, v) pairs
      flipped.
      """
      if check:
          assert len(set(d.values())) == len(
              d
          ), "Values were not unique!"
      return {v: k for k, v in iteritems(d)}
  
imports: from six import iteritems
label_desc: Use image node_id 2 for calling a global function with example usage: invert_unique(d, check) and returns: unknown