def rehydrate_plugin_instance(parent_class, class_name, options):
    """
    rehydrate an instance of a plugin based on JSON data

    as I document this, I wonder if it might be better to pickle the objects and
    store them in the db that way? I will consider this...

    args:
        - the parent class the child instance inherits from. Usually either
          ActionPluginBase or BlePluginBase.
        - the class name of the child we are rehydrating
        - init options for the child instance
    returns:
        an instance of a class, or None if instance could not be created.
    raises:
        none
    """
    for plugin in parent_class.plugins:
        if plugin.__name__ == class_name:
            obj = plugin(**options)
            return obj
    return None
