@classmethod
def merge(cls, key, data):
    """Merge two dicts or lists.

        For example:
            - {'a': 1, 'b': 2} + {'a': 42, 'c': 3}  => {'a': 42, 'b': 2, 'c': 3}
            - ['a', 'b', 'c']  + ['a', 'd', 'e']    => ['a', 'b', 'c', 'a', 'd', 'e']

        Args:
            key (str): Key to set (i.e. 'foo' or 'foo.bar.baz' for a deep key)
            data (dict|list): Value to update/extend for key.
        """
    items = cls.get(key)
    if items:
        if isinstance(items, dict):
            items.update(data)
        elif isinstance(items, list):
            items.extend(data)
