code: def check_valid_transitions(graph):
      msg = (
          "Step *{0.name}* specifies an invalid self.next() transition. "
          "Make sure the self.next() expression matches with one of the "
          "supported transition types."
      )
      for node in graph:
          if (
              node.type != "end"
              and node.has_tail_next
              and node.invalid_tail_next
          ):
              raise LintWarn(msg.format(node), node.tail_next_lineno)
  
imports: import re
  from .exception import MetaflowException
  from .util import all_equal
label_desc: Use image node_id 7 for calling a global function with example usage: check_valid_transitions(graph) without return types