(encoder, datum, schema, named_schemas, fname)
A record is encoded by encoding the values of its fields in the order
    that they are declared. In other words, a record is encoded as just the
    concatenation of the encodings of its fields.  Field values are encoded per
    their schema.
A record is encoded by encoding the values of its fields in the order
    that they are declared. In other words, a record is encoded as just the
    concatenation of the encodings of its fields.  Field values are encoded per
    their schema.
A record is encoded by encoding the values of its fields in the order that they are declared . In other words a record is encoded as just the concatenation of the encodings of its fields . Field values are encoded per their schema .
def write_record(encoder, datum, schema, named_schemas, fname):
    """A record is encoded by encoding the values of its fields in the order
    that they are declared. In other words, a record is encoded as just the
    concatenation of the encodings of its fields.  Field values are encoded per
    their schema."""
    for field in schema["fields"]:
        name = field["name"]
        if name not in datum and "default" not in field and "null" not in field["type"]:
            raise ValueError(f"no value and no default for {name}")
        write_data(
            encoder,
            datum.get(name, field.get("default")),
            field["type"],
            named_schemas,
            name,
        )
def write_record ( encoder , datum , schema , named_schemas , fname ) : for field in schema [ "fields" ] : name = field [ "name" ] if name not in datum and "default" not in field and "null" not in field [ "type" ] : raise ValueError ( f"no value and no default for {name}" ) write_data ( encoder , datum . get ( name , field . get ( "default" ) ) , field [ "type" ] , named_schemas , name , )