def METHOD_NAME(
    session: Session,
    uri: str,
    position: Position,
    flags: int = 0,
    group: Optional[int] = None
) -> Optional[sublime.View]:
    if group is None:
        group = session.window.active_group()
    if uri.startswith("file:"):
        filename = session.config.map_server_uri_to_client_path(uri)
    else:
        prefix = 'res://Packages'  # Note: keep in sync with core/url.py#_to_resource_uri
        assert uri.startswith(prefix)
        filename = sublime.packages_path() + url2pathname(uri[len(prefix):])
        # Window.open_file can only focus and scroll to a location in a resource file if it is already opened
        if not session.window.find_open_file(filename):
            return None
    return session.window.open_file(to_encoded_filename(filename, position), flags=flags, group=group)