public static IndexSpan ToIndexSpan(this SourceSpan span, PythonAst ast) => IndexSpan.FromBounds(ast.LocationToIndex(span.Start), ast.LocationToIndex(span.End));
public static IndexSpan ToIndexSpan(this Range range, PythonAst ast) => IndexSpan.FromBounds(ast.LocationToIndex(range.start), ast.LocationToIndex(range.end));
public static int ToIndex(this SourceLocation location, PythonAst ast) => ast.LocationToIndex(location);