code: def nearest_shipyard_position(board, ship):
      me = board.current_player
  
      if len(me.shipyards):
          shipyard_positions = [
              transform_position(shipyard.position)
              for shipyard in me.shipyards
          ]
  
          ship_position = transform_position(ship.position)
  
          distance = [
              mahattan_distance(shipyard_position, ship_position)
              for shipyard_position in shipyard_positions
          ]
  
          index = distance.index(min(distance))
  
          return me.shipyards[index].position
  
      else:
          return ship.position
  
file_path: PARL/examples/Baselines/Halite_competition/torch/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 7 for calling a global function with example usage: nearest_shipyard_position(board, ship) and returns: me, ship