code: def create_selection(self):
      self.selection, c = Selection.objects.get_or_create(
          title=self.selection_title
      )
      items = self.selection.items.all()
  
      for root, dirs, files in os.walk(self.media_directory):
          for filename in files:
              path = root + os.sep + filename
              filename_pre, ext = os.path.splitext(filename)
              item_title = filename_pre
              item, c = Item.objects.get_or_create(
                  title=item_title, source_file=path
              )
  
              if not item in items:
                  self.selection.items.add(item)
  
              if self.cleanup:
                  for result in item.results.all():
                      result.delete()
  
file_path: TimeSide/timeside/server/management/commands/timeside-run-experience.py
imports: from optparse import make_option
  from django.conf import settings
  from django.core.management.base import BaseCommand, CommandError
  from django.contrib.auth.models import User
  from django.template.defaultfilters import slugify
  from django.core.exceptions import MultipleObjectsReturned
  import os
  import timeside.core
  from timeside.server.models import Selection, Item, Processor, Preset, Experience, Task, Analysis, SubProcessor
  from timeside.server.models import _PENDING, _DONE
  from timeside.core.tools.test_samples import generateSamples
  import simplejson
label_desc: Use image node_id 3 for calling the Command obj's underlying member method code with example usage: obj.create_selection() without return types