def validate_adapter_class(validate_class, adapter_class):
 from .adapters import Adapter
 if isinstance(validate_class, dict):
  origional_data = validate_class.copy()
  validate_class = validate_class.get('import_path')
  if (not validate_class):
   raise Adapter.InvalidAdapterTypeException('The dictionary {} must contain a value for "import_path"'.format(str(origional_data)))
 if (not issubclass(import_module(validate_class), adapter_class)):
  raise Adapter.InvalidAdapterTypeException('{} must be a subclass of {}'.format(validate_class, adapter_class.__name__))

def validate_adapter_class ( validate_class , adapter_class ) : from . adapters import Adapter if isinstance ( validate_class , dict ) : origional_data = validate_class . copy ( ) validate_class = validate_class . get ( 'import_path' ) if ( not validate_class ) : raise Adapter . InvalidAdapterTypeException ( 'The dictionary {} must contain a value for "import_path"' . format ( str ( origional_data ) ) ) if ( not issubclass ( import_module ( validate_class ) , adapter_class ) ) : raise Adapter . InvalidAdapterTypeException ( '{} must be a subclass of {}' . format ( validate_class , adapter_class . __name__ ) )
raises an exception if validate_class is not a subclass of adapter_class .