_getFunction(identifier) {
    const { functionRes } = findFunctionInTpl(
      `${identifier.serviceName}/${identifier.functionName}`,
      this._template
    );
    if (!functionRes) {
      return;
    }
    const properties = functionRes['Properties'];
    return new Function({
      identifier,
      handler: properties.Handler,
      timeout: properties.Timeout,
      runtime: properties.Runtime,
      codeUri: properties.CodeUri,
      memorySize: properties.MemorySize,
      envVars: properties.EnvironmentVariables
    });
  }
Return the function metadata from the template.yaml.

@param identifier the identifier of the function.
@returns {*} the function metadata.
@private