Metrics:
Total lines of code: 639
Total lines skipped (#nosec): 0

blacklist: Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Test ID: B311
Severity: LOW
Confidence: HIGH
CWE: CWE-330
File: /custom_nodes/ComfyUI-Helper-Nodes/sampler.py
Line number: 26
More info: https://bandit.readthedocs.io/en/1.7.9/blacklists/blacklist_calls.html#b311-random
22	    """ Gets a new random seed from the rgthree_seed_random_state and resetting the previous state."""
23	    global seed_random_state
24	    prev_random_state = random.getstate()
25	    random.setstate(seed_random_state)
26	    seed = random.randint(1, 18446744073709551615)
27	    seed_random_state = random.getstate()
28	    random.setstate(prev_random_state)
29	    return seed