parameters: (node, subs)
return_statement: return contents
docstring: Fetch the node contents and replace all instances of the keys with
      their values.  For example, if subs is
          {'%VERSION%': '1.2345', '%BASE%': 'MyProg', '%prefix%': '/bin'},
      then all instances of %VERSION% in the file will be replaced with
      1.2345 and so forth.
docstring_summary: Fetch the node contents and replace all instances of the keys with
      their values.  For example, if subs is
          {'%VERSION%': '1.2345', '%BASE%': 'MyProg', '%prefix%': '/bin'},
      then all instances of %VERSION% in the file will be replaced with
      1.2345 and so forth.
docstring_tokens: Fetch the node contents and replace all instances of the keys with their values . For example if subs is { %VERSION% : 1 . 2345 %BASE% : MyProg %prefix% : / bin } then all instances of %VERSION% in the file will be replaced with 1 . 2345 and so forth .
function: def _do_subst(node, subs):
      """
      Fetch the node contents and replace all instances of the keys with
      their values.  For example, if subs is
          {'%VERSION%': '1.2345', '%BASE%': 'MyProg', '%prefix%': '/bin'},
      then all instances of %VERSION% in the file will be replaced with
      1.2345 and so forth.
      """
      contents = node.get_text_contents()
      if not subs: return contents
      for (k,v) in subs:
          contents = re.sub(k, v, contents)
      return contents
function_tokens: def _do_subst ( node , subs ) : contents = node . get_text_contents ( ) if not subs : return contents for ( k , v ) in subs : contents = re . sub ( k , v , contents ) return contents