def _get_value(lst, row_name, idx):
    """
        Helper function to parse the ics lines using a key to get the corresponding metadata.
        Args:
        ----------
        lst: list
            Ics lines
        row_name: string
            Key
        idx: int
            Index of the metadata
        Returns:
        ----------
        val : string
            Metadata
    """
    val = None
    for l in lst:
        if not l:
            continue
        if l[0] == row_name:
            try:
                val = l[idx]
            except Exception:
                print (row_name, idx)
                print (lst)
                val = None
            break
    return val