code: def refine_arg(expr, assumptions):
      """
      Handler for complex argument
  
      Explanation
      ===========
  
      >>> from sympy.assumptions.refine import refine_arg
      >>> from sympy import Q, arg
      >>> from sympy.abc import x
      >>> refine_arg(arg(x), Q.positive(x))
      0
      >>> refine_arg(arg(x), Q.negative(x))
      pi
      """
      rg = expr.args[0]
      if ask(Q.positive(rg), assumptions):
          return S.Zero
      if ask(Q.negative(rg), assumptions):
          return S.Pi
      return None
  
file_path: sympy/sympy/assumptions/refine.py
imports: from __future__ import annotations
  from typing import Callable
  from sympy.core import S, Add, Expr, Basic, Mul, Pow, Rational
  from sympy.core.logic import fuzzy_not
  from sympy.logic.boolalg import Boolean
  from sympy.assumptions import ask, Q
label_desc: Use image node_id 7 for calling a global function with example usage: refine_arg(expr, assumptions) and returns: None, S, S