code: def shell_call(command, **kwargs):
      """Calls shell command with parameter substitution.
  
      Args:
        command: command to run as a list of tokens
        **kwargs: dirctionary with substitutions
  
      Returns:
        whether command was successful, i.e. returned 0 status code
  
      Example of usage:
        shell_call(['cp', '${A}', '${B}'], A='src_file', B='dst_file')
      will call shell command:
        cp src_file dst_file
      """
      command = list(command)
      for i in range(len(command)):
          m = CMD_VARIABLE_RE.match(command[i])
          if m:
              var_id = m.group(1)
              if var_id in kwargs:
                  command[i] = kwargs[var_id]
      return subprocess.call(command) == 0
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from builtins import int
  import csv
  import json
  import logging
  import os
  import re
  import subprocess
  import sys
  import numpy
  from PIL import Image
  from six import iteritems
label_desc: Use image node_id 2 for calling a global function with example usage: shell_call(command) and returns: unknown