def METHOD_NAME(
    self,
    meeting_ids: list = None,
    race_ids: list = None,
    session: requests.Session = None,
    lightweight: bool = None,
) -> Union[list, List[resources.RaceDetails]]:
    """
    Search for races to get their details.
    :param list meeting_ids: Optionally restricts the results to the specified meeting IDs.
    The unique Id for the meeting equivalent to the eventId for that specific race as
    returned by listEvents
    :param list race_ids: Optionally restricts the results to the specified race IDs. The
    unique Id for the race in the format meetingid.raceTime (hhmm). raceTime is in GMT
    :param requests.session session: Requests session object
    :param bool lightweight: If True will return dict not a resource
    :rtype: list[resources.RaceDetails]
    """
    params = clean_locals(locals())
    method = "%s%s" % (self.URI, "listRaceDetails")
    (response, response_json, elapsed_time) = self.request(method, params, session)
    return self.process_response(
        response_json, resources.RaceDetails, elapsed_time, lightweight
    )