def check_supported_function(func, check_func):
 def inner(*args, **kwargs):
  obj = args[0]
  if check_func(obj):
   return func(*args, **kwargs)
  else:
   raise NotImplementedInROMError(obj, func)
 return inner

def check_supported_function ( func , check_func ) : def inner ( * args , ** kwargs ) : obj = args [ 0 ] if check_func ( obj ) : return func ( * args , ** kwargs ) else : raise NotImplementedInROMError ( obj , func ) return inner
decorator implementation that wraps a check around an esploader bootloader function to check if its supported .