code: def filter_empty_entries(
      input_dict: Dict[Union[Any], Tensor]
  ) -> Dict[Any, Tensor]:
      r"""Removes empty tensors from a dictionary. This avoids unnecessary
      computation when some node/edge types are non-reachable after trimming.
      """
      out_dict = copy.copy(input_dict)
      for key, value in input_dict.items():
          if value.numel() == 0:
              del out_dict[key]
      return out_dict
  
file_path: pytorch_geometric/torch_geometric/utils/_trim_to_layer.py
imports: import copy
  from typing import Any, Dict, List, Optional, Tuple, Union, overload
  import torch
  from torch import Tensor
  from torch_geometric.typing import Adj, EdgeType, MaybeHeteroAdjTensor, MaybeHeteroEdgeTensor, MaybeHeteroNodeTensor, NodeType, SparseStorage, SparseTensor
label_desc: Use image node_id 1 for calling a global function with example usage: filter_empty_entries(input_dict) and returns: out_dict