def warningMessage(warn, location = None):
    """
    Generate a standard warning message.

    Parameters
    ----------
    warn : str
        The warning message.
    location : str, optional
        Where the warning happens. E.g. CTL.funcs.funcs.warningMessage
    
    Returns
    -------
    str
        The generated warning message.
    """
    if (location is None):
        return "Warning: {}".format(warn)
    else:
        return "Warning in {}: {}".format(location, warn)