class_docstr: Class representing a pipeline template.
class_docstr_tok: ["Class","representing","a","pipeline","template","."]
docstr: t.append(cmd, kind) adds a new step at the end.
docstr_tok: ["t.append","(","cmd",",","kind",")","adds","a","new","step","at","the","end","."]
code: def append(self, cmd, kind):
      """t.append(cmd, kind) adds a new step at the end."""
      if not isinstance(cmd, str):
          raise TypeError("Template.append: cmd must be a string")
      if kind not in stepkinds:
          raise ValueError("Template.append: bad kind %r" % (kind,))
      if kind == SOURCE:
          raise ValueError(
              "Template.append: SOURCE can only be prepended"
          )
      if self.steps and self.steps[-1][1] == SINK:
          raise ValueError("Template.append: already ends with SINK")
      if kind[0] == "f" and not re.search(r"\$IN\b", cmd):
          raise ValueError("Template.append: missing $IN in cmd")
      if kind[1] == "f" and not re.search(r"\$OUT\b", cmd):
          raise ValueError("Template.append: missing $OUT in cmd")
      self.steps.append((cmd, kind))
  
file_path: catboost/contrib/tools/python3/src/Lib/pipes.py
imports: import re
  import os
  import tempfile
  import warnings
  from shlex import quote
label_desc: Use image node_id 6 for calling the Template obj's underlying member method code with example usage: obj.append(cmd, kind) without return types