code: def lint_iofile_by_index(
      self, rule, regex=re.compile(r"(input|output)\[[0-9]+\]")
  ):
      if rule.shellcmd and regex.search(rule.shellcmd):
          yield Lint(
              title="Do not access input and output files individually by index in shell commands",
              body="When individual access to input or output files is needed (i.e., just writing '{input}' "
              "is impossible), use names ('{input.somename}') instead of index based access.",
              links=[links.rules],
          )
  
file_path: snakemake/snakemake/linting/rules.py
imports: from itertools import chain
  import re
  import sys
  from snakemake.io import is_flagged
  from snakemake.linting import Linter, Lint, links, NAME_PATTERN
label_desc: Use image node_id 7 for calling the RuleLinter obj's underlying member method code with example usage: obj.lint_iofile_by_index(rule, regex) without return types