def METHOD_NAME(self, action: int) -> bool:
    # trade signal
    """
    Determine if the signal is valid.
    e.g.: agent wants a Actions.Long_exit while it is in a Positions.short
    """
    # Agent should only try to exit if it is in position
    if action in (Actions.Short_exit.value, Actions.Long_exit.value):
        if self._position not in (Positions.Short, Positions.Long):
            return False
    # Agent should only try to enter if it is not in position
    if action in (Actions.Short_enter.value, Actions.Long_enter.value):
        if self._position != Positions.Neutral:
            return False
    return True