code: def test_ScanArgs_remove_nonseq_outer_input():
      hmm_model_env = create_test_hmm()
      scan_args = hmm_model_env["scan_args"]
      hmm_model_env["scan_op"]
      Y_t = hmm_model_env["Y_t"]
      Y_rv = hmm_model_env["Y_rv"]
      mus_in = hmm_model_env["mus_in"]
      mus_t = hmm_model_env["mus_t"]
      sigmas_in = hmm_model_env["sigmas_in"]
      sigmas_t = hmm_model_env["sigmas_t"]
      Gamma_rv = hmm_model_env["Gamma_rv"]
      Gamma_in = hmm_model_env["Gamma_in"]
      S_in = hmm_model_env["S_in"]
      S_t = hmm_model_env["S_t"]
      rng_in = hmm_model_env["rng_in"]
  
      # Remove `Gamma` (i.e. a non-sequence outer-input)
      scan_args_copy = copy(scan_args)
      test_v = Gamma_rv
      rm_info = scan_args_copy.remove_from_fields(
          test_v, rm_dependents=True
      )
      removed_nodes, _ = zip(*rm_info)
  
      assert Gamma_rv in removed_nodes
      assert Gamma_in in removed_nodes
      assert S_in in removed_nodes
      assert S_t in removed_nodes
      assert Y_t in removed_nodes
      assert Y_rv in removed_nodes
  
      assert mus_in in scan_args_copy.outer_in_seqs
      assert sigmas_in in scan_args_copy.outer_in_seqs
      assert mus_t in scan_args_copy.inner_in_seqs
      assert sigmas_t in scan_args_copy.inner_in_seqs
      assert rng_in not in scan_args_copy.inner_out_shared
      assert not scan_args_copy.outer_out_shared
  
file_path: pytensor/tests/scan/test_utils.py
imports: from copy import copy
  import numpy
  import pytest
  import pytensor
  from pytensor import tensor
  from pytensor.scan.utils import ScanArgs
label_desc: Use image node_id 9 for calling a global function with example usage: test_ScanArgs_remove_nonseq_outer_input() without return types