code: def __init__(
      self,
      num_nodes: int,
      num_rels: int,
      d: int,
      proto,
      node_features=None,
      device="cpu",
      reg=0.01,
  ):
      super().__init__()
      nn, _, _, _, torch, _, _ = lazy_import_networks()
      self.reg = reg
      self.proto = proto
      self.node_features = node_features
  
      if self.node_features is not None:
          self.node_features = torch.tensor(
              self.node_features.values, dtype=torch.float32
          ).to(device)
          logger.info(f"--Using node features of shape {str(node_features.shape)}")  # type: ignore
      hidden = None
      if node_features is not None:
          hidden = self.node_features.shape[-1]  # type: ignore
      self.rgcn = RGCNEmbed(
          d, num_nodes, num_rels, hidden, device=device
      )
      self.relational_embedding = nn.Parameter(
          torch.Tensor(num_rels, d)
      )
  
      nn.init.xavier_uniform_(
          self.relational_embedding, gain=nn.init.calculate_gain("relu")
      )
  
imports: from typing import TYPE_CHECKING, Any
  from .None import constants
  import logging
label_desc: Use image node_id 1 to create a new HeteroEmbed object from inherited base classes: Module with example: obj = HeteroEmbed(num_nodes, num_rels, d, proto, node_features, device, reg)