def __init_subclass__(cls, **kwargs):
    '\n        An __init_subclass__ hook initializes all of the subclasses of a given class.\n        So for each subclass, it will call this block of code on import.\n        This replicates some metaclass magic without the need to be aware of metaclasses.\n        Here we use this to register each subclass in a dict that has the `is_datasource_for`\n        attribute. This is then passed into the TimeSeries Factory so we can register them.\n        '
    super().__init_subclass__(**kwargs)
    if hasattr(cls, 'is_datasource_for'):
        cls._registry[cls] = cls.is_datasource_for
An __init_subclass__ hook initializes all of the subclasses of a given class.
So for each subclass, it will call this block of code on import.
This replicates some metaclass magic without the need to be aware of metaclasses.
Here we use this to register each subclass in a dict that has the `is_datasource_for`
attribute. This is then passed into the TimeSeries Factory so we can register them.
def __init_subclass__(cls, **kwargs):
    '\n        An __init_subclass__ hook initializes all of the subclasses of a given class.\n        So for each subclass, it will call this block of code on import.\n        This replicates some metaclass magic without the need to be aware of metaclasses.\n        Here we use this to register each subclass in a dict that has the `is_datasource_for`\n        attribute. This is then passed into the TimeSeries Factory so we can register them.\n        '
    super().__init_subclass__(**kwargs)
    if hasattr(cls, 'is_datasource_for'):
        cls._registry[cls] = cls.is_datasource_for