code: def init(self, *, rngs: tp.Optional[Rngs] = None) -> State:
      kwargs = {}
      if rngs is not None:
          kwargs["rngs"] = rngs
      module = self.module_type(*self.args, **self.kwargs, **kwargs)
      state, graphdef = module.split()
      self.graphdef = graphdef
      return state
  
file_path: flax/flax/experimental/nnx/nnx/compatibility.py
imports: import dataclasses
  import typing
  from typing import Any
  from flax import linen
  from flax.experimental.nnx.nnx import helpers
  from flax.experimental.nnx.nnx import variables
  from flax.experimental.nnx.nnx.module import GraphDef, Module
  from flax.experimental.nnx.nnx.rnglib import Rngs
  from flax.experimental.nnx.nnx.state import State
label_desc: Use image node_id 1 for calling the Functional obj's underlying member method code with example usage: obj.init() and returns: state