code: def check_pos(board, pos, act):
      player_id = board.cells[pos].ship.player_id
  
      if act == "right":
          new_pos = ((pos[0] + 1) % size, pos[1])
      if act == "left":
          new_pos = ((pos[0] - 1) % size, pos[1])
      if act == "up":
          new_pos = (pos[0], (pos[1] + 1) % size)
      if act == "down":
          new_pos = (pos[0], (pos[1] - 1) % size)
  
      cell = board.cells[new_pos]
      if (cell.ship) or (
          cell.shipyard and cell.shipyard.player_id != player_id
      ):
          return False
  
      return True
  
file_path: PARL/examples/Baselines/Halite_competition/paddle/rl_trainer/utils.py
imports: from zerosum_env.envs.halite.helpers import *
  from collections import deque
  from config import config
  import numpy
  import random
label_desc: Use image node_id 5 for calling a global function with example usage: check_pos(board, pos, act) and returns: True, False