code: def get_project_record(name: str) -> db.Project:
      company_id = ctx.company_id
      if company_id is None:
          company_id = null()
  
      project_record = (
          db.session.query(db.Project)
          .filter(
              (func.lower(db.Project.name) == name)
              & (db.Project.company_id == company_id)
              & (db.Project.deleted_at == null())
          )
          .first()
      )
      return project_record
  
file_path: mindsdb/mindsdb/interfaces/model/functions.py
imports: from typing import Optional
  from sqlalchemy import null, func
  import mindsdb.interfaces.storage.db
  from mindsdb.utilities.context import context
  import mindsdb.utilities.profiler
label_desc: Use image node_id 2 for calling a global function with example usage: get_project_record(name) and returns: project_record