from typing import Callable
import torch


def get_gan_loss() -> Callable:
    """
    Gets the GAN loss method.

    :return:
        A function representing the GAN loss.
    """
    bcel = torch.nn.BCELoss()

    def _loss(y_pred, y_real):
        return bcel(y_pred, y_real)

    return _loss