docs: def _parse_canonical_minkey(doc):
      """Decode a JSON MinKey to bson.min_key.MinKey."""
      if doc['$minKey'] is not 1:
          raise TypeError('$minKey value must be 1: %s' % (doc,))
      if len(doc) != 1:
          raise TypeError('Bad $minKey, extra field(s): %s' % (doc,))
      return MinKey()