def __repr__(self):
        return "<NamedRequirements({}{})>".format(
            self.name,
            ", filename='{}'".format(self.filename.name) if self.filename
            else "")
def sample_fn(x):
    return utils.optimise_and_sample(x, module=model,
                                     data=None, is_training=False)[0]