code: def _schur_subsets_number(n):
      if n is S.Infinity:
          raise ValueError("Input must be finite")
      if n <= 0:
          raise ValueError("n must be a non-zero positive integer.")
      elif n <= 3:
          min_k = 1
      else:
          min_k = math.ceil(math.log(2 * n + 1, 3))
  
      return Integer(min_k)
  
file_path: sympy/sympy/combinatorics/schur_number.py
imports: import math
  from sympy.core import S
  from sympy.core.basic import Basic
  from sympy.core.function import Function
  from sympy.core.numbers import Integer
label_desc: Use image node_id 1 for calling a global function with example usage: _schur_subsets_number(n) and returns: Integer