code: def train(self, *args):
      # trainer.train(batch) was the old, pre-Lightning ReAgent trainer API.
      # make sure that nobody is trying to call trainer.train() this way.
      # trainer.train() or trainer.train(True/False) is allowed - this puts the network into training/eval mode.
      if (len(args) == 0) or (
          (len(args) == 1) and (isinstance(args[0], bool))
      ):
          super().train(*args)
      else:
          raise NotImplementedError(
              "Method .train() is not used for ReAgent Lightning trainers. Please use .fit() method of the pl.Trainer instead"
          )
  
imports: import inspect
  import logging
  import pytorch_lightning
  import torch
  from reagent.core.tensorboardX import SummaryWriterContext
  from reagent.core.utils import lazy_property
  from typing_extensions import final
label_desc: Use image node_id 19 for calling the ReAgentLightningModule obj's underlying member method code with example usage: obj.train() without return types