docstr: Execute python script `cmd`
  
  Reject any `args` because we're using ``exec`` to execute the script.
  
  Prepend some matplotlib setup to suppress figures
docstr_tok: ["Execute","python","script","`","cmd","`","Reject","any","`","args","`","because","we","'re","using","``","exec","``","to","execute","the","script",".","Prepend","some","matplotlib","setup","to","suppress","figures"]
code: def cmd_str_maker(self, cmd, args):
      """Execute python script `cmd`
  
      Reject any `args` because we're using ``exec`` to execute the script.
  
      Prepend some matplotlib setup to suppress figures
      """
      if len(args) != 0:
          raise ValueError(
              "Cannot use args with {8}".format(self.__class__)
          )
      return (
          f"""{PYTHON} -c "import matplotlib as mpl; mpl.use('agg'); """
          f"""exec(open('{cmd}', 'rt').read())" """
      )
  
file_path: nipy/tools/run_log_examples.py
imports: import os
  import re
  import sys
  from argparse import ArgumentParser, RawDescriptionHelpFormatter
  from os.path import abspath, dirname, expanduser, isfile
  from os.path import join
  from os.path import sep
  from subprocess import PIPE, Popen
label_desc: Use image node_id 1 for calling the PyProcLogger obj's underlying member method code with example usage: obj.cmd_str_maker(cmd, args) and returns: PYTHON, str, cmd, str