def serialize_pass_slots(pass_slots, by_gs=True):
    serial_array = []

    for s in pass_slots:

        serial_array.append({
            segment_serializers.SC_ID_K: s.spacecraft.identifier,
            segment_serializers.GS_ID_K: s.groundstation.identifier,
            availability_serializers.DATE_START_K: s.start.isoformat(),
            availability_serializers.DATE_END_K: s.end.isoformat()
        })

    return serial_array
Serializes a list of pass slots into an array of JSON-like serializable
dataset/ETHPy150Open satnet-project/server/services/simulation/jrpc/serializers/passes.py/serialize_pass_slots