code: def sorted_definitions(defs):
      # Note: `or ''` below is required because `module_path` could be
      return sorted(
          defs,
          key=lambda x: (
              x.module_path or "",
              x.line or 0,
              x.column or 0,
          ),
      )
  
imports: import re
  from collections import namedtuple
  from textwrap import dedent
  from parso.python.parser import Parser
  from parso.python import tree
  from jedi._compatibility import u
  from jedi.evaluate.syntax_tree import eval_atom
  from jedi.evaluate.helpers import evaluate_call_of_leaf
  from jedi.evaluate.compiled import get_string_context_set
  from jedi.cache import call_signature_time_cache
label_desc: Use image node_id 1 for calling a global function with example usage: sorted_definitions(defs) and returns: sorted