docs: def gravitational_force(position_a, mass_a, position_b, mass_b):
      """Returns the gravitational force between the two bodies a and b."""
      distance = distance_between(position_a, position_b)
  
      # Calculate the direction and magnitude of the force.
      angle = math.atan2(position_a[1] - position_b[1], position_a[0] - position_b[0])
      magnitude = G * mass_a * mass_b / (distance**2)
  
      # Find the x and y components of the force.
      # Determine sign based on which one is the larger body.
      sign = -1 if mass_b > mass_a else 1
      x_force = sign * magnitude * math.cos(angle)
      y_force = sign * magnitude * math.sin(angle)
      return x_force, y_force