import tensorflow as tf

        for i in range(2, 2 + len(expected_extra_dims)):
            mask = tf.expand_dims(mask, axis=i)
        mask = tf.tile(mask, [1, 1] + expected_extra_dims)
        return tf.where(mask, expanded_tensor, if_masked_tensor)


def initial_layer(
    window_feature: WindowFeatures, *, clip_magnitude=10.0, include_flux_and_time=False
) -> tf.Tensor:
    features = tf.expand_dims(window_feature.dflux_dt(clip_magnitude=clip_magnitude), 2)
    if include_flux_and_time:
        dflux = tf.expand_dims(window_feature.dflux, 2)
        dtime = tf.expand_dims(window_feature.dtime, 2)
        features = tf.concat([features, dflux, dtime],
                             axis=2,
                             name="initial_layer_concat")
    return features


class CutoffData:
    def __init__(self, config_json: dict):
        self.window_size: int = config_json["window_size"]
        self.band_time_diff: int = config_json["band_time_diff"]
        self.embedding_size: int = config_json["desired_num_cutoffs"]
