def _convert_state(state):
 state = state.lower()
 if (u'play' in state):
  return u'play'
 if (u'pause' in state):
  return u'pause'
 if (u'stop' in state):
  return u'stop'
 return u'fallback'

def _convert_state ( state ) : state = state . lower ( ) if ( u'play' in state ) : return u'play' if ( u'pause' in state ) : return u'pause' if ( u'stop' in state ) : return u'stop' return u'fallback'
guess player state .