You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mod.rs
    path of file: ./repos/farm/crates/node/src/plugin_adapters/js_plugin_adapter
    
    the code of the file until where you have to start completion: use std::collections::HashSet;
use std::sync::Arc;

use farmfe_compiler::{DYNAMIC_VIRTUAL_PREFIX, FARM_CSS_MODULES_SUFFIX, RUNTIME_SUFFIX};
use farmfe_core::{
  context::CompilationContext,
  error::{CompilationError, Result},
  plugin::{
    EmptyPluginHookParam, Plugin
    
pub fn get_named_property<T: FromNapiValue>(env: &Env, obj: &JsObject, field: &str) -> Result<T> {
  if obj.has_named_property(field).map_err(|e| {
    CompilationError::NAPIError(format!(
      "Get field {} of config object failed. {:?}",
      field, e
    ))
  })? {
    unsafe {
      T::from_napi_value(
        env.raw(),
        obj
          .get_named_property::<JsUnknown>(field)
          .map_err(|e| {
            CompilationError::NAPIError(format!(
              "Get field {} of config object failed. {:?}",
              field, e
            ))
          })?
          .raw(),
      )
      .map_err(|e| {
        CompilationError::NAPIError(format!("Transform config field {} failed. {:?}", field, e))
      })
    }
  } else {
    Err(CompilationError::NAPIError(format!(
      "Invalid Config: the config object does not have field {}",
      field
    )))
  }
}