class_docstr: simple wrapper of lightgbm , using importance ranking to select top-k features.
  
  Parameters
  ----------
  fixlen : int
      K for top-K important features.
class_docstr_tok: ["simple","wrapper","of","lightgbm",",","using","importance","ranking","to","select","top-k","features",".","Parameters","--","--","--","--","--","fixlen",":","int","K","for","top-K","important","features","."]
code: def _fit(
      self, homogeneous_static_graph: GeneralStaticGraph
  ) -> GeneralStaticGraph:
      if not isinstance(homogeneous_static_graph, GeneralStaticGraph):
          raise TypeError
      elif not (
          homogeneous_static_graph.nodes.is_homogeneous
          and homogeneous_static_graph.edges.is_homogeneous
      ):
          raise ValueError
      if "x" in homogeneous_static_graph.nodes.data:
          features: torch.Tensor = homogeneous_static_graph.nodes.data[
              "x"
          ]
      elif "feat" in homogeneous_static_graph.nodes.data:
          features: torch.Tensor = homogeneous_static_graph.nodes.data[
              "feat"
          ]
      else:
          raise ValueError("Node features not exists")
      if "y" in homogeneous_static_graph.nodes.data:
          label: torch.Tensor = homogeneous_static_graph.nodes.data["y"]
      elif "label" in homogeneous_static_graph.nodes.data:
          label: torch.Tensor = homogeneous_static_graph.nodes.data[
              "label"
          ]
      else:
          raise ValueError("Node label not exists")
      if "train_mask" in homogeneous_static_graph.nodes.data:
          train_mask: _typing.Optional[
              torch.Tensor
          ] = homogeneous_static_graph.nodes.data["train_mask"]
      else:
          train_mask: _typing.Optional[torch.Tensor] = None
      data = autogl.data.Data(
          edge_index=homogeneous_static_graph.edges.connections,
          x=features,
          y=label,
      )
      data.train_mask = train_mask
      self._selection = _gbdt_generator(
          data, self.__fixlen, *self.__args, **self.__kwargs
      )
      return homogeneous_static_graph
  
file_path: AutoGL/autogl/module/feature/_selectors/_gbdt.py
imports: import numpy
  import pandas
  import torch
  import typing
  import autogl
  from autogl.data.graph import GeneralStaticGraph
  from ..None import _feature_engineer_registry
  import lightgbm
  from sklearn.model_selection import train_test_split
  from ._basic import BaseFeatureSelector
label_desc: Use image node_id 2 for calling the GBDTFeatureSelector obj's underlying member method code with example usage: obj._fit(homogeneous_static_graph) and returns: homogeneous_static_graph