docstr: Upserts a new function cost entry
  
  Arguments:
      function_id(int): id of the function
      name (str) : name of the function
      cost(int)  : cost of the function
docstr_tok: ["Upserts","a","new","function","cost","entry","Arguments",":","function_id","(","int",")",":","id","of","the","function","name","(","str",")",":","name","of","the","function","cost","(","int",")",":","cost","of","the","function"]
code: def upsert_entry(self, function_id: int, name: str, new_cost: int):
      """Upserts a new function cost entry
  
      Arguments:
          function_id(int): id of the function
          name (str) : name of the function
          cost(int)  : cost of the function
      """
      try:
          function_obj = self.session.execute(
              select(self.model).filter(
                  self.model._function_id == function_id
              )
          ).scalar_one_or_none()
          if function_obj:
              function_obj.update(self.session, _cost=new_cost)
          else:
              self.insert_entry(function_id, name, new_cost)
      except Exception as e:
          raise CatalogError(
              f"Error while upserting entry to FunctionCostCatalog: {str(e)}"
          )
  
file_path: evadb/evadb/catalog/services/function_cost_catalog_service.py
imports: from sqlalchemy.orm import Session
  from sqlalchemy.sql.expression import select
  from evadb.catalog.models.function_cost_catalog import FunctionCostCatalog, FunctionCostCatalogEntry
  from evadb.catalog.services.base_service import BaseService
  from evadb.utils.errors import CatalogError
label_desc: Use image node_id 3 for calling the FunctionCostCatalogService obj's underlying member method code with example usage: obj.upsert_entry(function_id, name, new_cost) without return types