code: def emit_code_from_ir(sql_query_tree, compiler_metadata):
      
      context = CompilationContext(
          query_path_to_selectable=dict(),
          query_path_to_location_info=sql_query_tree.query_path_to_location_info,
          query_path_to_output_fields=sql_query_tree.query_path_to_output_fields,
          query_path_to_filters=sql_query_tree.query_path_to_filters,
          query_path_to_node=sql_query_tree.query_path_to_node,
          compiler_metadata=compiler_metadata,
      )
  
      return _query_tree_to_query(sql_query_tree.root, context)
docs: Return a SQLAlchemy Query from a passed SqlQueryTree.
  
      Args:
          sql_query_tree: SqlQueryTree, tree representation of the query to emit.
          compiler_metadata: SqlMetadata, SQLAlchemy specific metadata.
  
      Returns:
          SQLAlchemy Query