pub fn python_local_module_alias_path_before<E, C>(
reference: Node<'_>,
local_name: &str,
source: &str,
context: &mut C,
imported_module_path: impl FnMut(Node<'_>, &mut C) -> Result<Option<Box<[Box<str>]>>, E>,
charge_step: impl FnMut(&mut C) -> Result<(), E>,
) -> Result<Option<Box<[Box<str>]>>, E>Expand description
Resolve a local name assigned a module object before reference.
The caller resolves imported module expressions from its structured import binder. This helper follows only straight-line assignments in the current function or module suite; branches and other direct rebinding statements invalidate an earlier alias. Attribute paths are read from tree-sitter nodes, never reconstructed from source text.