

def get_shards(self):
    'Returns a list of ShardMeta objects sorted by shard ID'
    shard_config = self.partition_config['shards']
    host_map = self.partition_config.get('host_map', {
        
    })
    db_shards = []
    for (db, shard_range) in db_shards.items():
        db_shards.extend([DbShard(shard_num, db) for shard_num in range(shard_range[0], (shard_range[1] + 1))])
    db_shards = sorted(db_shards, key=(lambda shard: shard.shard_id))
    return [shard.to_shard_meta(host_map) for shard in db_shards]

dataset/ETHPy150Open dimagi/commcare-hq/corehq/sql_db/config.py PartitionConfig.get_shards/VarMisuse@49/90 `shard_config`->`db_shards`