def METHOD_NAME(self) -> VISAEventContext:
    """Access the VISA context used to retrieve attributes.
    This is equivalent to the session on a resource.
    """
    c = self._context
    if c is None:
        raise errors.InvalidSession()
    return c