def assign_survey(night, conf):
    """
    Takes a desi production configuration (yaml) dictionary and determines
    the survey corresponding to a given night based on the contents of the conf
    dictionary, if psosible. Otherwise returns None.

    Args:
        night, int. The night you want to know the survey it corresponds to.
        conf, dict. Dictionary that returned when the configuration yaml file was read in.

    Returns:
        survey, str. The survey the night was taken under, according to the conf file.
    """
    for survey in conf['DateRanges']:
        first, last = conf['DateRanges'][survey]
        if night >= first and night <= last:
            return survey
    else:
        return None