def METHOD_NAME(
    self,
    name: str,
    version: str,
    options: Optional[infra.DiagnosticOptions] = None,
) -> infra.DiagnosticContext:
    """Creates a new diagnostic context.
    Args:
        name: The subject name for the diagnostic context.
        version: The subject version for the diagnostic context.
        options: The options for the diagnostic context.
    Returns:
        A new diagnostic context.
    """
    if options is None:
        options = infra.DiagnosticOptions()
    context: infra.DiagnosticContext[infra.Diagnostic] = infra.DiagnosticContext(
        name, version, options
    )
    self.contexts.append(context)
    return context