input: 
  def search_kb_sru(query: str, collection: str = False, startrecord: int = 1, maximumrecords: int = 1, recordschema: str = False) -> response:
      """
      Provides a Python API for KB SRU. Allows searching by query string and optionally specifying a collection name, start record number, maximum number of records to return, and record schema. The method returns a response object containing the search results.
  
      >>> search_kb_sru('example query', 'ANP', 1, 1).records[0].titles
      ['ANP Radiobulletins Digitaal']
      """
  
output:     import requests
      import xml.etree.ElementTree as ET
  
      base_url = "http://jsru.kb.nl/sru/sru"
      params = {
          "operation": "searchRetrieve",
          "version": "1.2",
          "query": query,
          "startRecord": startrecord,
          "maximumRecords": maximumrecords,
      }
      if collection:
          params["recordSchema"] = collection
      if recordschema:
          params["recordSchema"] = recordschema
  
      response = requests.get(base_url, params=params)
      if response.status_code != 200:
          raise Exception(f"Failed to retrieve data: {response.status_code}")
  
      root = ET.fromstring(response.content)
      records = []
      for record in root.findall('.//{http://www.loc.gov/zing/srw/}record'):
          titles = [title.text for title in record.findall('.//{http://purl.org/dc/elements/1.1/}title')]
          records.append({"titles": titles})
  
      return {"records": records}