def METHOD_NAME(
    self,
    market_ids: list,
    data_entries: str = None,
    session: requests.Session = None,
    lightweight: bool = False,
) -> Union[list, List[resources.RaceCard]]:
    """
    Returns a list of race cards based on market ids provided.
    :param list market_ids: The filter to select desired markets
    :param str data_entries: Data to be returned
    :param requests.session session: Requests session object
    :param bool lightweight: If True will return dict not a resource
    :rtype: list[resources.RaceCard]
    """
    if not self.app_key:
        raise RaceCardError(
            "You need to login before requesting a race_card\n"
            "APIClient.race_card.login()"
        )
    params = self.create_race_card_req(market_ids, data_entries)
    (response, response_json, elapsed_time) = self.request(
        "raceCard", params=params, session=session
    )
    return self.process_response(
        response_json, resources.RaceCard, elapsed_time, lightweight
    )