def _set_shape_to_named_tuple(schema, fields, batched_output):
    """Assign static shape for all tensors"""
    fields_as_dict = fields._asdict()
    _set_shape(schema, fields_as_dict, batched_output)
    return schema.make_namedtuple_tf(**fields_as_dict)
Assign static shape for all tensors
petastorm/tf_utils.py