def active_contests(platforms):
  """Gets all the active contests based on time and platforms"""
  contests_data = get_contests_data()
  platform_filter = get_platform_filter(platforms)

  active_challenges = [contest for contest in contests_data["active"] if contest["host_name"] in platform_filter]

  return active_challenges
dataset/ETHPy150Open architv/chcli/challenges/cli.py/active_contests/original