docs: def _merge_entity(entity, if_match):
      '''
      Constructs a merge entity request.
      '''
      _validate_not_none('if_match', if_match)
      _validate_entity(entity)
  
      request = HTTPRequest()
      request.method = 'MERGE'
      request.headers = [_DEFAULT_CONTENT_TYPE_HEADER,
                          _DEFAULT_ACCEPT_HEADER,
                          ('If-Match', _to_str(if_match))]
      request.body = _get_request_body(_convert_entity_to_json(entity))
  
      return request