code: def test_bit_scan1():
      assert bit_scan1(0) is None
      assert bit_scan1(1) == 0
      assert bit_scan1(-1) == 0
      assert bit_scan1(2) == 1
      assert bit_scan1(7) == 0
      assert bit_scan1(-7) == 0
      for i in range(100):
          assert bit_scan1(1 << i) == i
          assert bit_scan1((1 << i) * 31337) == i
      for i in range(500):
          n = (1 << 500) + (1 << i)
          assert bit_scan1(n) == i
      assert bit_scan1(1 << 1000001) == 1000001
      assert bit_scan1((1 << 273956) * 7**37) == 273956
      # issue 12709
      for i in range(1, 10):
          big = 1 << i
          assert bit_scan1(-big) == bit_scan1(big)
  
file_path: sympy/sympy/external/tests/test_ntheory.py
imports: from itertools import permutations
  from sympy.external.ntheory import bit_scan1, remove, bit_scan0, is_fermat_prp, is_euler_prp, is_strong_prp, gcdext, _lucas_sequence, is_fibonacci_prp, is_lucas_prp, is_selfridge_prp, is_strong_lucas_prp, is_strong_selfridge_prp, is_bpsw_prp, is_strong_bpsw_prp
  from sympy.testing.pytest import raises
label_desc: Use image node_id 1 for calling a global function with example usage: test_bit_scan1() without return types