class_docstr: Class representing a pipeline template.
class_docstr_tok: ["Class","representing","a","pipeline","template","."]
docstr: t.prepend(cmd, kind) adds a new step at the front.
docstr_tok: ["t.prepend","(","cmd",",","kind",")","adds","a","new","step","at","the","front","."]
code: def prepend(self, cmd, kind):
      """t.prepend(cmd, kind) adds a new step at the front."""
      if not isinstance(cmd, str):
          raise TypeError("Template.prepend: cmd must be a string")
      if kind not in stepkinds:
          raise ValueError("Template.prepend: bad kind %r" % (kind,))
      if kind == SINK:
          raise ValueError(
              "Template.prepend: SINK can only be appended"
          )
      if self.steps and self.steps[0][1] == SOURCE:
          raise ValueError(
              "Template.prepend: already begins with SOURCE"
          )
      if kind[0] == "f" and not re.search(r"\$IN\b", cmd):
          raise ValueError("Template.prepend: missing $IN in cmd")
      if kind[1] == "f" and not re.search(r"\$OUT\b", cmd):
          raise ValueError("Template.prepend: missing $OUT in cmd")
      self.steps.insert(0, (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 7 for calling the Template obj's underlying member method code with example usage: obj.prepend(cmd, kind) without return types