def METHOD_NAME(error_msg):
    return PingCommandResult(
        error=error_msg,
        host_or_ip=param.host_or_ip,
        num_packets=param.num_packets or DEFAULT_NUM_PACKETS,
        stats=None,
    )