class_docstr: Class representing a pipeline template.
class_docstr_tok: ["Class","representing","a","pipeline","template","."]
docstr: t.open(file, rw) returns a pipe or file object open for
  reading or writing; the file is the other end of the pipeline.
docstr_tok: ["t.open","(","file",",","rw",")","returns","a","pipe","or","file","object","open","for","reading","or","writing",";","the","file","is","the","other","end","of","the","pipeline","."]
code: def open(self, file, rw):
      """t.open(file, rw) returns a pipe or file object open for
      reading or writing; the file is the other end of the pipeline."""
      if rw == "r":
          return self.open_r(file)
      if rw == "w":
          return self.open_w(file)
      raise ValueError(
          "Template.open: rw must be 'r' or 'w', not %r" % (rw,)
      )
  
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 8 for calling the Template obj's underlying member method code with example usage: obj.open(file, rw) and returns: self, self