<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Design a function which takes two numbers as input and returns the largest one as output.
<|im_end|>
<|im_start|>assistant
def largest_of_two(num1, num2):
  if num1 > num2:
    return num1
  else:
    return num2<|im_end|>
