def _msg(controller, message):
 if isinstance(controller, stem.socket.ControlSocket):
  controller.send(message)
  return controller.recv()
 else:
  return controller.msg(message)

def _msg ( controller , message ) : if isinstance ( controller , stem . socket . ControlSocket ) : controller . send ( message ) return controller . recv ( ) else : return controller . msg ( message )
sends and receives a message with either a :class:~stem .