code: def build_binary_for_navigation(package_name, dirname, maps):
      folder = os.path.join(
          CARLA_ROOT_PATH, "Util", "DockerUtils", "dist"
      )
  
      # process each map
      for umap in maps:
          # get the sources for the map (single or tiles)
          if "source" in umap:
              tiles = [umap["source"]]
          # disabled until we have a new Recast adapted to work with tiles
          # elif ("tiles" in umap):
          #     tiles = umap["tiles"]
          else:
              continue
  
          # get the target name
          target_name = umap["name"]
          xodr_filename = os.path.basename(umap["xodr"])
          xodr_path_target = ""
  
          # copy the XODR file into docker utils folder
          if (
              "xodr" in umap
              and umap["xodr"]
              and os.path.isfile(os.path.join(dirname, umap["xodr"]))
          ):
              # Make sure the `.xodr` file have the same name than the `.umap`
              xodr_path_source = os.path.abspath(
                  os.path.join(dirname, umap["xodr"])
              )
              xodr_path_target = os.path.join(folder, xodr_filename)
              # copy
              print(
                  'Copying "'
                  + xodr_path_source
                  + '" to "'
                  + xodr_path_target
                  + '"'
              )
              shutil.copy2(xodr_path_source, xodr_path_target)
  
          for tile in tiles:
              fbx_filename = os.path.basename(tile)
              fbx_name_no_ext = os.path.splitext(fbx_filename)[0]
              fbx_path_target = ""
  
              # copy the FBX file into docker utils folder
              if os.path.isfile(os.path.join(dirname, tile)):
                  # Make sure the `.fbx` file have the same name than the `.umap`
                  fbx_path_source = os.path.abspath(
                      os.path.join(dirname, tile)
                  )
                  fbx_path_target = os.path.join(folder, fbx_filename)
                  # copy
                  print(
                      'Copying "'
                      + fbx_path_source
                      + '" to "'
                      + fbx_path_target
                      + '"'
                  )
                  shutil.copy2(fbx_path_source, fbx_path_target)
  
              # rename the xodr with the same name of the source/tile
              # os.rename(os.path.join(folder, xodr_filename), os.path.join(folder, "%s.xodr" % fbx_name_no_ext))
  
              # make the conversion
              if os.name == "nt":
                  subprocess.call(
                      ["build.bat", fbx_name_no_ext, xodr_filename],
                      cwd=folder,
                      shell=True,
                  )
              else:
                  subprocess.call(
                      ["chmod +x build.sh"], cwd=folder, shell=True
                  )
                  subprocess.call(
                      "./build.sh %s %s"
                      % (fbx_name_no_ext, xodr_filename),
                      cwd=folder,
                      shell=True,
                  )
  
              # rename the xodr with the original name
              # os.rename(os.path.join(folder, "%s.xodr" % fbx_name_no_ext), os.path.join(folder, xodr_filename))
  
              # copy the binary file
              nav_path_source = os.path.join(
                  folder, "%s.bin" % fbx_name_no_ext
              )
              nav_folder_target = os.path.join(
                  CARLA_ROOT_PATH,
                  "Unreal",
                  "CarlaUE4",
                  "Content",
                  package_name,
                  "Maps",
                  target_name,
                  "Nav",
              )
              if os.path.exists(nav_path_source):
                  if not os.path.exists(nav_folder_target):
                      os.makedirs(nav_folder_target)
                  nav_path_target = os.path.join(
                      nav_folder_target, "%s.bin" % fbx_name_no_ext
                  )
                  print(
                      'Copying "'
                      + nav_path_source
                      + '" to "'
                      + nav_path_target
                      + '"'
                  )
                  shutil.copy2(nav_path_source, nav_path_target)
  
              # remove files
              if os.path.exists(nav_path_source):
                  os.remove(nav_path_source)
  
              if os.path.exists(fbx_path_target):
                  os.remove(fbx_path_target)
  
          if os.path.exists(xodr_path_target):
              os.remove(xodr_path_target)
  
imports: from __future__ import print_function
  import errno
  import fnmatch
  import glob
  import json
  import os
  import shutil
  import subprocess
  import sys
  import argparse
  import threading
  import copy
  import carla
label_desc: Use image node_id 14 for calling a global function with example usage: build_binary_for_navigation(package_name, dirname, maps) without return types