def METHOD_NAME(self, var_name, value, time=np.nan):
    """Set the value of a variable.
    Parameters
    ----------
    var_name : string
        The name of the variable to set. A new variable is created if
        `var_name` does not exist in the record.
    value : T
        The value of `var_name`. The type, T should be an appropriate type
        for `var_name`.
    time : float or int, optional
        The time in the record to change a variable. The latest time in the
        record is the default.
    """
    time = self._check_time(time)
    if var_name not in self.variables:
        self._dict[var_name] = [np.nan] * (self.count_of_time_steps)
    idx = self._get_time_index(time)
    self._dict[var_name][idx] = value