input: from typing import Dict, List
  
  def extract_titles_from_response(response_obj: response) -> List[str]:
      """ Extracts and returns a list of all titles from the given response object containing search results.
      >>> test_response = response(record_data, sru)  # Assuming record_data and sru are predefined.
      >>> extract_titles_from_response(test_response)
      ['Sample Title 1', 'Sample Title 2']
      """
      return response_obj.titles
output:     titles = []
      for record in response_obj.record_data:
          titles.append(record.title)
      return titles