code: def _get_input_batch_from_obs(framework, obs, lstm):
      if framework == "torch":
          batch = {
              SampleBatch.OBS: convert_to_torch_tensor(obs)[None],
          }
      else:
          batch = {
              SampleBatch.OBS: tf.convert_to_tensor(obs)[None],
          }
      if lstm:
          batch[SampleBatch.OBS] = batch[SampleBatch.OBS][None]
      return batch
  
imports: import itertools
  import unittest
  import gymnasium
  import numpy
  import tree
  import ray
  from ray.rllib import SampleBatch
  from ray.rllib.algorithms.ppo.ppo_catalog import PPOCatalog
  from ray.rllib.algorithms.ppo.tf.ppo_tf_rl_module import PPOTfRLModule
  from ray.rllib.algorithms.ppo.torch.ppo_torch_rl_module import PPOTorchRLModule
  from ray.rllib.core.models.base import STATE_IN, STATE_OUT
  from ray.rllib.core.rl_module.rl_module import RLModuleConfig
  from ray.rllib.models.preprocessors import get_preprocessor
  from ray.rllib.utils.framework import try_import_tf, try_import_torch
  from ray.rllib.utils.numpy import convert_to_numpy
  from ray.rllib.utils.torch_utils import convert_to_torch_tensor
label_desc: Use image node_id 5 for calling a global function with example usage: _get_input_batch_from_obs(framework, obs, lstm) and returns: batch