Given the module name and path of a class, tries to retrieve the class.
The loaded class can be used to instantiate new objects.
module_path- either an absolute path to a Python class, or the name of the class in the local / global scope.
lookup_path- a path where to load the class from, if it cannot be found in the local / global scope.
a Python class
ImportError, in case the Python class cannot be found. RasaException, in case the imported result is something other than a class
Returns all known (imported) subclasses of a class.
Return the module path of an instance's class.
Sorts a list of dictionaries by their first key.
Allows to avoid recomputing a property over and over.
The result gets stored in a local var. Computation of the property will happen once, on the first call of the property. All succeeding calls will use the value stored in the private property.
Caches method calls based on the call's
sync methods. Don't apply this to functions.
f- The decorated method whose return value should be cached.
The return value which the method gives for the first call with the given arguments.
Transforms e.g. a list like ['A', 'B', 'C'] into a sentence 'A, B and C'.
Returns only the kwargs which are required by a function. Keys, contained in the exception list, are not included.
kwargs- All available kwargs.
func- The function which should be called.
excluded_keys- Keys to exclude from the result.
Subset of kwargs which are accepted by
Warns users that they are using an experimental feature.
Return the parameters of the function
func as a list of names.