code: def create_plate(self, plate_id, description, meta_data_id, values, complement, parent_plate):
          
          # Make sure the plate id doesn't already exist
          with switch_db(PlateDefinitionModel, db_alias='hyperstream'):
              try:
                  p = PlateDefinitionModel.objects.get(plate_id=plate_id)
                  if p:
                      logging.info("Plate with id {} already exists".format(plate_id))
                      return self.plates[plate_id]
              except DoesNotExist:
                  pass
              except MultipleObjectsReturned:
                  raise
  
              plate_definition = PlateDefinitionModel(
                  plate_id=plate_id,
                  description=description,
                  meta_data_id=meta_data_id,
                  values=values,
                  complement=complement,
                  parent_plate=parent_plate
              )
  
              self.add_plate(plate_definition)
              plate_definition.save()
              return self.plates[plate_id]
docs: Create a new plate, and commit it to the database
  
          :param plate_id: The plate id - required to be unique
          :param description: A human readable description
          :param meta_data_id: The meta data id, which should correspond to the tag in the global meta data
          :param values: Either a list of string values, or the empty list (for use with complement)
          :param complement: If complement is true, then the complement of the values list will be used when getting
          values from the global meta data
          :param parent_plate: The parent plate identifier
          :return: The newly created plate
          :type plate_id: str | unicode
          :type complement: bool
          :type values: list | tuple