def METHOD_NAME(raise_error=True) -> Optional[ModuleType]:
    """
    Import poptorch and returns it.
    It is wrapped in a function to avoid breaking the code
    for non-IPU devices which did not install poptorch.
    Parameters:
        raise_error: Whether to raise an error if poptorch is unavailable.
            If `False`, return `None`
    Returns:
        The poptorch module
    """
    try:
        import poptorch
        return poptorch
    except ImportError as e:
        if raise_error:
            raise e
        return