code: def lint_singularity(
      self, snakefile, regex=re.compile("singularity:")
  ):
      for match in regex.finditer(snakefile):
          line = get_line(match, snakefile)
          yield Lint(
              title="Deprecated singularity directive used for container definition in line {}.".format(
                  line
              ),
              body="Use the container directive instead (it is agnostic of the underlying container runtime).",
              links=[links.containers],
          )
  
file_path: snakemake/snakemake/linting/snakefiles.py
imports: import re
  from itertools import chain
  from snakemake.linting import Linter, Lint, links, NAME_PATTERN
label_desc: Use image node_id 8 for calling the SnakefileLinter obj's underlying member method code with example usage: obj.lint_singularity(snakefile, regex) without return types