def evaluate_constants(const_arrays, expr):
    """Convert constant arguments to torch, and perform any possible constant
    contractions.
    """
    const_arrays = [to_torch(x) for x in const_arrays]
    return expr(*const_arrays, backend="torch", evaluate_constants=True)
Convert constant arguments to torch, and perform any possible constant
    contractions.
    
opt_einsum/backends/torch.py