def _concat_hierarchy(series: Sequence[TimeSeries]):
    """
    Used to concatenate the hierarchies of multiple TimeSeries, when concatenating series
    along axis 1 (components). This simply merges the hierarchy dictionaries.
    """
    concat_hierarchy = dict()
    for s in series:
        if s.has_hierarchy:
            concat_hierarchy.update(s.hierarchy)
    return None if len(concat_hierarchy) == 0 else concat_hierarchy

    Used to concatenate the hierarchies of multiple TimeSeries, when concatenating series
    along axis 1 (components). This simply merges the hierarchy dictionaries.
    
darts/timeseries.py