code: def nearest_halite(board, ship):
      halite_map = np.array(board.observation["halite"]).reshape(
          (size, size)
      )
  
      check = np.zeros_like(halite_map)
  
      pos = transform_position(ship.position)
  
      q = deque()
      q.append(pos)
  
      while len(q):
          pos = q.popleft()
          if halite_map[pos[0], pos[1]] > 10:
              cell = board.cells[(pos[1], size - pos[0] - 1)]
              if not cell.ship_id and not cell.shipyard_id:
                  return (pos[1], size - pos[0] - 1)
          else:
              for offset in [[1, 0], [-1, 0], [0, 1], [0, -1]]:
                  tmp = (
                      (pos[0] + offset[0]) % size,
                      (pos[1] + offset[1]) % size,
                  )
  
                  if halite_map[tmp[0], tmp[1]] > 10:
                      cell = board.cells[(tmp[1], size - tmp[0] - 1)]
  
                      assert cell.halite == halite_map[tmp[0], tmp[1]]
                      if not cell.ship_id and not cell.shipyard_id:
                          return (tmp[1], size - tmp[0] - 1)
  
                  if not check[tmp[0], tmp[1]]:
                      q.append(tmp)
                      check[tmp[0], tmp[1]] = 1
  
      return (pos[1], size - pos[0] - 1)
  
imports: import pickle
  import base64
  import random
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.distributions import Categorical
  from zerosum_env.envs.halite.helpers import *
  from zerosum_env import make, evaluate
  from collections import deque
  import os
label_desc: Use image node_id 11 for calling a global function with example usage: nearest_halite(board, ship) and returns: pos,  unknown, pos,  unknown, tmp,  unknown