input: 
  def extract_titles(response_obj: response, filter_type: str = "") -> List[str]:
      """
      Extracts titles from the provided response object. If a filter type is provided, only titles of that type are returned.
      If no filter type is provided, all titles are returned.
      
      >>> extract_titles(response_obj, filter_type="main")
      ['Main Title 1', 'Main Title 2']
      >>> extract_titles(response_obj)
      ['Title 1', 'Title 2', 'Main Title 1', 'Main Title 2']
      """
      if filter_type == "main":
          return response_obj.titlesMain
      else:
          return response_obj.titles
  
output:     if filter_type == "main":
          return [title for title in response_obj.titles if title in response_obj.titlesMain]
      else:
          return response_obj.titles