code: def get_calc_ids(datadir=None):
      
      datadir = datadir or get_datadir()
      if not os.path.exists(datadir):
          return []
      calc_ids = set()
      for f in os.listdir(datadir):
          mo = re.match(CALC_REGEX, f)
          if mo:
              calc_ids.add(int(mo.group(2)))
      return sorted(calc_ids)
docs: Extract the available calculation IDs from the datadir, in order.