code: def lint_mixed_func_and_rules(
      self,
      snakefile,
      rule_regex=re.compile("rule .+?:"),
      func_regex=re.compile("def .+?:"),
  ):
      if rule_regex.search(snakefile) and func_regex.search(snakefile):
          yield Lint(
              title="Mixed rules and functions in same snakefile.",
              body="Small one-liner functions used only once should be "
              "defined as lambda expressions. Other functions should be collected "
              "in a common module, e.g. 'rules/common.smk'. This makes the workflow "
              "steps more readable.",
              links=[links.includes],
          )
  
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 5 for calling the SnakefileLinter obj's underlying member method code with example usage: obj.lint_mixed_func_and_rules(snakefile, rule_regex, func_regex) without return types