docs: def assert_json_subset(first, second):
      """Assert that a JSON object or array is a subset of another JSON object
      or array.
  
      The first JSON object or array must be supplied as a JSON-compatible
      dict or list, the JSON object or array to check must be a string, an
      UTF-8 bytes object, or a JSON-compatible list or dict.
  
      A JSON non-object, non-array value is the subset of another JSON value,
      if they are equal.
  
      A JSON object is the subset of another JSON object if for each name/value
      pair in the former there is a name/value pair in the latter with the same
      name. Additionally the value of the former pair must be a subset of the
      value of the latter pair.
  
      A JSON array is the subset of another JSON array, if they have the same
      number of elements and each element in the former is a subset of the
      corresponding element in the latter.
  
      >>> assert_json_subset({}, '{}')
      >>> assert_json_subset({}, '{"foo": "bar"}')
      >>> assert_json_subset({"foo": "bar"}, '{}')
      Traceback (most recent call last):
      ...
      AssertionError: element 'foo' missing from element $
      >>> assert_json_subset([1, 2], '[1, 2]')
      >>> assert_json_subset([2, 1], '[1, 2]')
      Traceback (most recent call last):
      ...
      AssertionError: element $[0] differs: 2 != 1
      >>> assert_json_subset([{}], '[{"foo": "bar"}]')
      >>> assert_json_subset({}, "INVALID JSON")
      Traceback (most recent call last):
      ...
      json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
      """
  
      if not isinstance(second, (dict, list, str, bytes)):
          raise TypeError("second must be dict, list, str, or bytes")
      if isinstance(second, bytes):
          second = second.decode("utf-8")
      if isinstance(second, _Str):
          parsed_second = json_loads(second)
      else:
          parsed_second = second
  
      if not isinstance(parsed_second, (dict, list)):
          raise AssertionError(
              "second must decode to dict or list, not {}".format(
                  type(parsed_second)
              )
          )
  
      comparer = _JSONComparer(_JSONPath("$"), first, parsed_second)
      comparer.assert_()