code: def minimap(obs):
      """Give a crude ascii rendering of feature_minimap."""
      player = obs.feature_minimap.player_relative
      selected = obs.feature_minimap.selected
      visibility = obs.feature_minimap.visibility_map
      max_y, max_x = visibility.shape
      out = _summary(obs, "minimap", max_y * 2) + "\n"
      for y in range(max_y):
          started = False
          for x in range(max_x):
              s = selected[y, x]
              p = player[y, x]
              v = visibility[y, x]
              if started and not s:
                  out += ")"
              elif not started and s:
                  out += "("
              else:
                  out += " "
              if v:
                  out += PLAYER_RELATIVE[p]
              else:
                  out += VISIBILITY[v]
              started = s
          if started:
              out += ")"
          out += "\n"
      return out
  
imports: from pysc2.lib import units
label_desc: Use image node_id 4 for calling a global function with example usage: minimap(obs) and returns: out