docs: def query(options, collection_name, num_to_skip,
            num_to_return, query, field_selector, opts, check_keys=False):
      """Get a **query** message.
      """
      data = struct.pack("<I", options)
      data += bson._make_c_string(collection_name)
      data += struct.pack("<i", num_to_skip)
      data += struct.pack("<i", num_to_return)
      encoded = bson.BSON.encode(query, check_keys, opts)
      data += encoded
      max_bson_size = len(encoded)
      if field_selector is not None:
          encoded = bson.BSON.encode(field_selector, False, opts)
          data += encoded
          max_bson_size = max(len(encoded), max_bson_size)
      (request_id, query_message) = __pack_message(2004, data)
      return (request_id, query_message, max_bson_size)