code: def _parse_shard_list(shard_list, current_shard_list):
      
      if not shard_list:
          return current_shard_list
      target_shards = []
      for n in shard_list.split(","):
          n = n.strip()
          if n.isdigit() and n in current_shard_list:
              target_shards.append(n)
          elif n:
              rng = n.split("-")
              if len(rng) == 2:
                  s = rng[0].strip()
                  e = rng[1].strip()
                  if s.isdigit() and e.isdigit():
                      for x in range(int(s), int(e)+1):
                          if str(x) in current_shard_list:
                              target_shards.append(str(x))
  
      logger.info("parse_shard, shard_list: '{0}' current shard '{1}' result: '{2}'".format(shard_list,
                                                                                            current_shard_list, target_shards))
      if not target_shards:
          raise LogException("InvalidParameter", "There's no available shard with settings {0}".format(shard_list))
  
      return target_shards
docs: parse shard list
      :param shard_list: format like: 1,5-10,20
      :param current_shard_list: current shard list
      :return: