class_docstr: Interact with OpenFaaS to query, deploy, invoke and update function.
  
  :param function_name: Name of the function, Defaults to None
  :param conn_id: openfaas connection to use, Defaults to open_faas_default
      for example host : http://openfaas.faas.com, Connection Type : Http
docstr: Deploy OpenFaaS function.
docstr_tok: ["Deploy","OpenFaaS","function","."]
code: def deploy_function(
      self, overwrite_function_if_exist: bool, body: dict[str, Any]
  ) -> None:
      """Deploy OpenFaaS function."""
      if overwrite_function_if_exist:
          self.log.info(
              "Function already exist %s going to update",
              self.function_name,
          )
          self.update_function(body)
      else:
          url = self.get_conn().host + self.DEPLOY_FUNCTION
          self.log.info("Deploying function %s", url)
          response = requests.post(url, body)
          if response.status_code != OK_STATUS_CODE:
              self.log.error("Response status %d", response.status_code)
              self.log.error("Failed to deploy")
              raise AirflowException("failed to deploy")
          else:
              self.log.info("Function deployed %s", self.function_name)
  
file_path: airflow/airflow/providers/openfaas/hooks/openfaas.py
imports: from __future__ import annotations
  from typing import Any
  import requests
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 3 for calling the OpenFaasHook obj's underlying member method code with example usage: obj.deploy_function(overwrite_function_if_exist, body) without return types