<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def collect_cmd(self, args, ret):
 """Collect analytics info from a CLI command."""

        from dvc.command.daemon import CmdDaemonAnalytics

        assert isinstance(ret, int) or ret is None

        if ret is not None:
            self.info[self.PARAM_CMD_RETURN_CODE] = ret

        if args is not None and hasattr(args, "func"):
            assert args.func != CmdDaemonAnalytics
            self.info[self.PARAM_CMD_CLASS] = args.func.__name__