code: def calculate_heartbeats(shb, chb):
      
      (sx, sy) = shb
      (cx, cy) = chb
      x = 0
      y = 0
      if cx != 0 and sy != '0':
          x = max(cx, int(sy))
      if cy != 0 and sx != '0':
          y = max(cy, int(sx))
      return x, y
docs: Given a heartbeat string from the server, and a heartbeat tuple from the client,
      calculate what the actual heartbeat settings should be.
  
      :param (str,str) shb: server heartbeat numbers
      :param (int,int) chb: client heartbeat numbers
  
      :rtype: (int,int)