docstr: Used as an apply_transform function to convert temporary node
  features
  into binned node features.
docstr_tok: ["Used","as","an","apply_transform","function","to","convert","temporary","node","features","into","binned","node","features","."]
code: def _bin_features(
      graph, key, bin_edges, feature_dim=2, as_label=False
  ):
      """Used as an apply_transform function to convert temporary node
      features
      into binned node features.
      """
      arr = np.array(graph[key])
      feat = np.digitize(arr, bin_edges) - 1
      assert np.min(feat) >= 0
      assert np.max(feat) <= feature_dim - 1
      graph[key] = FeatureAugment._one_hot_tensor(
          feat, one_hot_dim=feature_dim, as_label=as_label
      )
  
imports: import logging
  import networkx
  import numpy
  import torch
  import torch.nn
  from deepsnap.graph import Graph
  import graphgym.register
  from graphgym.config import cfg
  from graphgym.contrib.transform.identity import compute_identity
label_desc: Use image node_id 3 for calling the FeatureAugment obj's underlying member method code with example usage: obj._bin_features(graph, key, bin_edges, feature_dim, as_label) without return types