docstr: Check if the experiment already exists and if not then add the experiment to
  the project
docstr_tok: ["Check","if","the","experiment","already","exists","and","if","not","then","add","the","experiment","to","the","project"]
code: def register_experiment(self, experiment_id):
      """
      Check if the experiment already exists and if not then add the experiment to
      the project
      """
      try:
          experiment = Experiment.objects.get(
              experiment_id=experiment_id
          )
      except Experiment.DoesNotExist:
          experiment = Experiment.objects.create(
              experiment_id=experiment_id,
              project=self.project,
              user=self.user,
              name=experiment_id,
              status=ExperimentStatus.IN_PROCESS,
          )
  
      return experiment
  
imports: import json
  from settings import settings
  from datetime import datetime
  from django.utils import timezone
  from django.contrib.auth.models import AnonymousUser
  from channels.db import database_sync_to_async
  from channels.auth import login
  from channels.generic.websocket import AsyncWebsocketConsumer
  from modelchimp.models.membership import Membership
  from modelchimp.models.experiment import Experiment
  from modelchimp.enum import ClientEvent, ExperimentStatus
label_desc: Use image node_id 2 for calling the TrackerConsumer obj's underlying member method code with example usage: obj.register_experiment(experiment_id) and returns: experiment