class_docstr: drop constant features
code: def _fit(
      self, static_graph: GeneralStaticGraph
  ) -> GeneralStaticGraph:
      if (
          "x" in static_graph.nodes.data
          and self._selection not in (Ellipsis, None)
          and isinstance(self._selection, torch.Tensor)
          and torch.is_tensor(self._selection)
          and self._selection.dim() == 1
      ):
          feature: _typing.Optional[
              np.ndarray
          ] = static_graph.nodes.data["x"].numpy()
      elif (
          "feat" in static_graph.nodes.data
          and self._selection not in (Ellipsis, None)
          and isinstance(self._selection, torch.Tensor)
          and torch.is_tensor(self._selection)
          and self._selection.dim() == 1
      ):
          feature: _typing.Optional[
              np.ndarray
          ] = static_graph.nodes.data["feat"].numpy()
      else:
          feature: _typing.Optional[np.ndarray] = None
      self._selection: _typing.Optional[
          torch.Tensor
      ] = torch.from_numpy(
          np.where(
              np.all(feature == feature[0, :], axis=0)
              == np.array(False)
          )[0]
          if feature is not None
          and isinstance(feature, np.ndarray)
          and feature.ndim == 2
          else None
      )
      return static_graph
  
file_path: AutoGL/autogl/module/feature/_selectors/_basic.py
imports: import numpy
  import torch
  import typing
  from autogl.data.graph import GeneralStaticGraph
  from .._base_feature_engineer import BaseFeatureEngineer
  from .._feature_engineer_registry import FeatureEngineerUniversalRegistry
label_desc: Use image node_id 1 for calling the FilterConstant obj's underlying member method code with example usage: obj._fit(static_graph) and returns: static_graph