def add_sync_methods(cls):
 for name in cls.__dict__.keys():
  if name.endswith('_async'):
   sync_name = name[:(-6)]
   if (not hasattr(cls, sync_name)):
    setattr(cls, sync_name, _make_sync_method(name))
 return cls

def add_sync_methods ( cls ) : for name in cls . __dict__ . keys ( ) : if name . endswith ( '_async' ) : sync_name = name [ : ( - 6 ) ] if ( not hasattr ( cls , sync_name ) ) : setattr ( cls , sync_name , _make_sync_method ( name ) ) return cls
class decorator to add synchronous methods corresponding to async methods .