  def ExecuteFunction(self,
                      function_name: str,
                      region: str,
                      args: Dict[str, Any]) -> Dict[str, Any]:
    """Executes a Google Cloud Function.

    Args:
      function_name (str): The name of the function to call.
      region (str): Region to execute functions in.
      args (Dict): Arguments to pass to the function. Dictionary content
          details can be found in
          https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions  # pylint: disable=line-too-long

    Returns:
      Dict[str, str]: Return value from function call.

    Raises:
      RuntimeError: When cloud function arguments cannot be serialized or
          when an HttpError is encountered.
    """

    service = self.GcfApi()
    cloud_function = service.projects().locations().functions() # pylint: disable=no-member

    try:
      json_args = json.dumps(args)
    except TypeError as exception:
      error_msg = (
          'Cloud function args [{0:s}] could not be serialized:'
          ' {1!s}').format(str(args), exception)
      raise RuntimeError(error_msg) from exception

    function_path = 'projects/{0:s}/locations/{1:s}/functions/{2:s}'.format(
        self.project_id, region, function_name)

    logger.debug(
        'Calling Cloud Function [{0:s}] with args [{1!s}]'.format(
            function_name, args))
    try:
      function_return = cloud_function.call(
          name=function_path, body={
              'data': json_args
          }).execute()  # type: Dict[str, Any]
    except (HttpError, ssl.SSLError) as exception:
      error_msg = 'Cloud function [{0:s}] call failed: {1!s}'.format(
          function_name, exception)
      raise RuntimeError(error_msg) from exception

    return function_return
Executes a Google Cloud Function.

Args:
function_name (str): The name of the function to call.
region (str): Region to execute functions in.
args (Dict): Arguments to pass to the function. Dictionary content
details can be found in
https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions  # pylint: disable=line-too-long

Returns:
Dict[str, str]: Return value from function call.

Raises:
RuntimeError: When cloud function arguments cannot be serialized or
when an HttpError is encountered.
libcloudforensics/providers/gcp/internal/function.py