def normalize_callback(cb):
 if isinstance(cb, Callback):
  return cb._callback
 elif isinstance(cb, tuple):
  return cb
 else:
  raise TypeError('Callbacks must be either `Callback` or `tuple`')

def normalize_callback ( cb ) : if isinstance ( cb , Callback ) : return cb . _callback elif isinstance ( cb , tuple ) : return cb else : raise TypeError ( 'Callbacks must be either `Callback` or `tuple`' )
normalizes a callback to a tuple .