<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def visit_file(self, item, parent):
 """ If file is small add create small file command otherwise raise error. Large files shouldn't be passed to SmallItemUploadTaskBuilder. """

        if item.need_to_send:
            if item.size > self.settings.config.upload_bytes_per_chunk:
                msg = "Programmer Error: Trying to upload large file as small item size:{} name:{}"
                raise ValueError(msg.format(item.size, item.name))
            else:
                command = CreateSmallFileCommand(self.settings, item, parent,
                                                 self.settings.file_upload_post_processor)
                self.task_runner_add(parent, item, command)