def METHOD_NAME(self):
    """Get the motor state.
    Returns:
        (enum HardwareObjectState): Motor state.
    """
    state = HardwareObjectState.UNKNOWN
    for stat in self.motor_obj.state.current_states_names:
        try:
            return HardwareObjectState[stat]
        except KeyError:
            if stat == "DISABLED":
                # we need to treat DISABLED before any other auxillary state
                return HardwareObjectState.OFF
            if stat == "MOVING":
                # MOVING has higher priority than other auxillary states
                return HardwareObjectState.BUSY
            # finally the state will corresponf to the last in the list
            # of the auxillary states.
            state = self._state2enum(stat)[0]
    return state