input: Write a function to calculate the greatest common divisor (GCD) of two given numbers. The function should take two integers as input and return the GCD. The approach should be a recursive one using the Euclidean algorithm. If either of the two numbers is zero, the function should return the other number as the GCD. The function should handle positive integers and zero inputs.
  
  assert gcd(-4, 10) == 2
  assert gcd(0, 5) == 5
  assert gcd(20, 0) == 20
  assert gcd(48, 18) == 6
  assert gcd(17, 13) == 1
output: def gcd(a, b):
      if b == 0:
          return abs(a)
      return gcd(b, a % b)