code: def register(self, entity):
          
          response = self.api.post_entity(entity.serialize)
          print(response)
          print()
          if response['status']['code'] == 200:
              entity.id = response['id']
          if response['status']['code'] == 409: # entity already exists
              entity.id = next(i.id for i in self.api.agent_entities if i.name == entity.name)
              self.update(entity)
          return entity
docs: Registers a new entity and returns the entity object with an ID