parameters: (self, delivery_line, movement, activate_kw,
                            base_id, cell_key)
return_statement: return cell
docstring: Refer to the docstring in GeneratedDeliveryBuilder.
        Unlike GeneratedDeliveryBuilder, SimulatedDeliveryBuilder needs to respect
        existing relationship.
docstring_summary: Refer to the docstring in GeneratedDeliveryBuilder.
        Unlike GeneratedDeliveryBuilder, SimulatedDeliveryBuilder needs to respect
        existing relationship.
docstring_tokens: Refer to the docstring in GeneratedDeliveryBuilder . Unlike GeneratedDeliveryBuilder SimulatedDeliveryBuilder needs to respect existing relationship .
function: def _createDeliveryCell(self, delivery_line, movement, activate_kw,
                            base_id, cell_key):
      """
        Refer to the docstring in GeneratedDeliveryBuilder.
        Unlike GeneratedDeliveryBuilder, SimulatedDeliveryBuilder needs to respect
        existing relationship.
      """
      try:
        old_cell = movement.getDeliveryValue()
      except AttributeError:
        old_cell = None
      if old_cell is None:
        # from scratch
        cell = delivery_line.newCell(base_id=base_id, \
                 portal_type=self.getDeliveryCellPortalType(),
                 activate_kw=activate_kw,*cell_key)
      else:
        # from duplicated original line
        cp = tryMethodCallWithTemporaryPermission(
          delivery_line, 'Copy or Move',
          lambda parent, *ids:
          parent._duplicate(parent.manage_copyObjects(ids=ids))[0],
          (delivery_line, old_cell.getId()), {}, CopyError)
        cell = delivery_line[cp['new_id']]
  
      return cell
function_tokens: def _createDeliveryCell ( self , delivery_line , movement , activate_kw , base_id , cell_key ) : try : old_cell = movement . getDeliveryValue ( ) except AttributeError : old_cell = None if old_cell is None : # from scratch cell = delivery_line . newCell ( base_id = base_id , portal_type = self . getDeliveryCellPortalType ( ) , activate_kw = activate_kw , * cell_key ) else : # from duplicated original line cp = tryMethodCallWithTemporaryPermission ( delivery_line , 'Copy or Move' , lambda parent , * ids : parent . _duplicate ( parent . manage_copyObjects ( ids = ids ) ) [ 0 ] , ( delivery_line , old_cell . getId ( ) ) , { } , CopyError ) cell = delivery_line [ cp [ 'new_id' ] ] return cell