code: def find(self, request=None, pre_request=None):
      inject = self._ctx.get("inject")
      if not inject:
          return
  
      request_path = ""
      if request:
          request_path = request.path
      if pre_request:
          url = pre_request["url"]
          parsed = urllib.parse.urlparse(url)
          request_path = parsed.path
  
      rules = inject.get("rules", [])
      for r in rules:
          # print("INJECT_REQUEST: check rule =", r, request_path)
          match = r.get("match")
          if not match:
              continue
          # TODO: make matching better when we have more to do
          count = match.get("count")
          path_suffix = match.get("path_suffix")
          query_str = match.get("query_str")
          if query_str and request:
              req_url = request.url
              parsed = urllib.parse.urlparse(req_url)
              req_qs = parsed.query
              if query_str != req_qs:
                  # print("NOMATCH", query_str, req_qs)
                  continue
          if path_suffix:
              if request_path.endswith(path_suffix):
                  requests_error = r.get("requests_error")
                  response = r.get("response")
                  http_status = r.get("http_status")
                  # print("INJECT_REQUEST: match =", r, requests_error, response, http_status)
                  #  requests_error is for pre_request checks only
                  if requests_error and not pre_request:
                      continue
                  if count is not None:
                      if count == 0:
                          continue
                      match["count"] = count - 1
                  action = InjectRequestsAction()
                  if response:
                      action.response = response
                  if http_status:
                      action.http_status = http_status
                  if requests_error:
                      action.requests_error = requests_error
                  # print("INJECT_REQUEST: action =", action)
                  return action
  
      return None
  
imports: import json
  import threading
  import urllib
  from unittest.mock import MagicMock
  import requests
label_desc: Use image node_id 2 for calling the InjectRequestsParse obj's underlying member method code with example usage: obj.find(request, pre_request) and returns: None, action