def METHOD_NAME(self, platform=None, cli=None, root=None):
    root = root or env.get("SPYTEST_TEXTFSM_ROOT", "templates")
    basedir = os.path.join(os.path.dirname(__file__), '..', root)
    basedir = os.path.abspath(basedir)
    platform = env.get("SPYTEST_TEXTFSM_PLATFORM", platform)
    self.root = os.path.join(basedir, platform) if platform else basedir
    if not os.path.exists(self.root):
        self.root = basedir
    self.samples = os.path.join(self.root, 'test')
    index = env.get("SPYTEST_TEXTFSM_INDEX_FILENAME", platform or "index")
    self.cli_tables = OrderedDict()
    for index in index.split(","):
        if not os.path.exists(os.path.join(self.root, index)):
            index = "index"
        self.cli_tables[index] = clitable.CliTable(index, self.root)
    self.platform = platform
    self.cli = cli