code: def table_source(caller, expr):
      from hail import Table
  
      source = expr._indices.source
      if not isinstance(source, Table):
          raise ValueError(
              "{}: Expect an expression of 'Table', found {}".format(
                  caller,
                  "expression of '{}'".format(source.__class__)
                  if source is not None
                  else "scalar expression",
              )
          )
      return source
  
file_path: hail/hail/python/hail/expr/expressions/expression_utils.py
imports: from typing import Set, Dict
  from hail.typecheck import typecheck, setof
  from .indices import Indices, Aggregation
  from ..expressions import Expression, ExpressionException, expr_any
  from ...ir import MakeTuple
label_desc: Use image node_id 9 for calling a global function with example usage: table_source(caller, expr) and returns: source