def METHOD_NAME(
    _response: lib.Deserializable[dict],
    settings: Settings,
) -> Tuple[ShipmentDetails, List[Message]]:
    response = _response.deserialize()
    errors = parse_error_response(response, settings)
    details = (
        _extract_details(response, settings)
        if all(key in response for key in ["label", "shipment"])
        else None
    )
    return details, errors