fl4health.mixins.personalized.utils module

ensure_protocol_compliance(func, instance, args, kwargs)[source]

Wrapper to ensure that a the instance is of BasicClient type.

NOTE: this should only be used within a BasicClient.

Parameters:
  • decorator (# are params specified and supplied by the wrapt)

  • func (Callable) – the function to be wrapped

  • instance (Any | None) – the associated instance if it is a method belonging to a class or a standalone

  • args (Any) – args passed to func

  • kwargs (Any) – kwargs passed to func

Raises:

TypeError – we raise error if the instance is not a BasicClient.

Returns:

_description_

Return type:

_type_