code: def head_to(board, start_pos, des_pos, ignore_teammates):
      ori_pos = start_pos
  
      act = nearby_enemy(
          board, board.cells[start_pos].ship, ignore_teammates
      )
      if act is not None:
          return act
  
      start_pos = transform_position(start_pos)
      des_pos = transform_position(des_pos)
  
      central = int(size / 2)
      offset_x = des_pos[0] - central
      offset_y = des_pos[1] - central
  
      new_pos = (
          (start_pos[0] - offset_x + size) % size,
          (start_pos[1] - offset_y + size) % size,
      )
  
      if new_pos[1] < central and check_pos(board, ori_pos, "right"):
          return ShipAction.RIGHT
      if new_pos[1] > central and check_pos(board, ori_pos, "left"):
          return ShipAction.LEFT
      if new_pos[0] < central and check_pos(board, ori_pos, "down"):
          return ShipAction.DOWN
      if new_pos[0] > central and check_pos(board, ori_pos, "up"):
          return ShipAction.UP
  
      return None
  
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 4 for calling a global function with example usage: head_to(board, start_pos, des_pos, ignore_teammates) and returns: None, act, ShipAction, ShipAction, ShipAction, ShipAction