def prepare_shell_data(self, shells, key, entry):
        """Prepare one shell or docker task."""
        if self.can_process_shell(entry):
            if key in ['python']:
                entry['type'] = key

            if 'with' in entry and isinstance(entry['with'], str):
                rendered_with = ast.literal_eval(render(entry['with'],
                                                        variables=self.pipeline.variables,
                                                        model=self.pipeline.model,
                                                        env=self.get_merged_env(include_os=True)))
            elif 'with' in entry:
                rendered_with = entry['with']
            else:
                rendered_with = ['']

            for item in rendered_with:
                shells.append({
                    'id': self.next_task_id,
                    'creator': key,
                    'entry': entry,
                    'model': self.pipeline.model,
                    'env': self.get_merged_env(),
                    'item': item,
                    'dry_run': self.pipeline.options.dry_run,
                    'debug': self.pipeline.options.debug,
                    'strict': self.pipeline.options.strict,
                    'variables': self.pipeline.variables,
                    'temporary_scripts_path': self.pipeline.options.temporary_scripts_path})
                self.next_task_id += 1
Prepare one shell or docker task.