code: def has_valid_embedding_base_layer(layer):
      """Check if the layer has an embedding base layer"""
      return hasattr(layer, "base_layer") and isinstance(
          layer.base_layer, (torch.nn.Linear, torch.nn.Embedding)
      )
  
file_path: peft/src/peft/utils/save_and_load.py
imports: import os
  import warnings
  from typing import Optional
  import torch
  from huggingface_hub import file_exists, hf_hub_download
  from huggingface_hub.utils import EntryNotFoundError
  from safetensors.torch import load_file
  from .other import EMBEDDING_LAYER_NAMES, SAFETENSORS_WEIGHTS_NAME, WEIGHTS_NAME, infer_device
  from .peft_types import PeftType
label_desc: Use image node_id 1 for calling a global function with example usage: has_valid_embedding_base_layer(layer) and returns: unknown