def METHOD_NAME(data):
    """Select backend.
    Parameter
    ---------
    data : array-like or string or None
        Indicates the backend to choose.
        Optional, default equals None.
    Returns
    -------
    backend : class
        The backend class.
        If data is a Numpy array or data equals 'numpy' or data is None,
        backend equals NumpyBackend().
        If data is a PyTorch array or data equals 'pytorch',
        backend equals PytorchBackend().
    """
    if "torch" in f"{type(data)}" or "torch" in f"{data}".lower():
        return PyTorchBackend()
    return NumPyBackend()