def get_index_size_in_kb(opensearch, index_name):
    """
    Gets the size of an index in kilobytes
    Args:
        opensearch: opensearch client
        index_name: name of index to look up
    Returns:
        size of index in kilobytes
    """
    return int(
        opensearch.indices.stats(index_name, metric='store')['indices']
        [index_name]['total']['store']['size_in_bytes']) / 1024