How to solve captcha with method using Selenium?

I was given a method to solve captchas on a website. The thing is, now that I wrote the scraping script, I don’t know how I’m supposed to use this method for it to solve me the captcha in my target website (I’m using selenium).
I located the element but that’s about it.

So where do I use the method? This is what I’m supposed to use:

resolve_simple_captcha(image_base64)

This is my view:

from django.shortcuts import render, HttpResponse
import requests
from django.views.generic import FormView
from .forms import Mon
from app.ws_sr_padron import get_persona
from app.captcha import resolve_simple_captcha
from time import sleep

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC

class ConstanciaInscripcion(FormView):

    def get(self, request):
       return render(request, 'app/constancia-inscripcion.html')
    
    def post(self,request):

        form = Mon(request.POST)
        email = request.POST['Email']

        cuit_r = int(request.POST["CUIT"])
        response = get_persona(cuit_r)
        
        try:
            nombre = response["persona"]["nombre"]
            apellido = response["persona"]["apellido"]
        except KeyError:
            nombre, apellido = None, None
            print("El CUIT ingresado es incorrecto")

        except TypeError:
            nombre, apellido = None, None
            print("El CUIT ingresado es incorrecto")
        
        else:
            print(nombre, apellido)
        
            if form.is_valid():
                cuit = form.cleaned_data.get('CUIT')
                email = form.cleaned_data.get('Email')
                cuit.save()
                email.save()
                return render(request, 'app/constancia-inscripcion.html')            

        #Selenium script
        DRIVER_PATH = 'C:/Users/chromedriver.exe'
        driver = webdriver.Chrome(executable_path=DRIVER_PATH)
        driver.get('https://google.com') #I changed the url for this

        driver.switch_to.frame(driver.find_element_by_tag_name("iframe"))
        wait = WebDriverWait(driver, 30) 
        elem = wait.until(EC.presence_of_element_located((By.XPATH,"//input[@id='cuit']")))
        elem.send_keys(cuit_r)
        
        
      
      
        elem2 = wait.until(EC.presence_of_element_located((By.XPATH,"//input[@id='captchaField']")))
        elem2.send_keys()

        elem3 = wait.until(EC.element_to_be_clickable((By.XPATH, '//div[@id="btnConsultar"]')))
        elem3.click()        

        return render(request, 'app/constancia-inscripcion.html')