def get_time_string(contest, contest_type):

  if contest_type == challenge().ACTIVE:
    time_diff = time_difference(contest["end"])
  elif contest_type == challenge().UPCOMING:
    time_diff = time_difference(contest["start"])
  elif contest_type in [challenge().HIRING, challenge().SHORT, challenge().ALL]:
    try:
      time_diff = time_difference(contest["start"])
    except:
      time_diff = time_difference(contest["end"])
  time_diff_string = ""

  if time_diff.days > 0: 
    time_diff_string = "{0} days {1} hours".format(time_diff.days, time_diff.hours)
  elif time_diff.hours > 0:
    time_diff_string = "{0} hours {1} minutes".format(time_diff.hours, time_diff.minutes)
  else:
    time_diff_string = "{0} minutes".format(time_diff.minutes)
  return time_diff_string
Removes empty fields from the processed schema
dataset/ETHPy150Open architv/chcli/challenges/writers.py/get_time_string--crossover with--dataset/ETHPy150Open CenterForOpenScience/scrapi/scrapi/linter/document.py/strip_empty