def METHOD_NAME(level, level_minus_one):
  # Already applied
  # cond1 = level in range(1, self.program_cnt)
  if level_minus_one <= level <= level_minus_one + 1 and level <= self.max_stack_level:
    return True