input: 
  from typing import Union
  
  
  def square_root(x: Union[int, float]) -> float:
      """
      Calculate the square root of a number, raising a TypeError if the input is not an integer or float.
  
      >>> square_root(4)
      2.0
      >>> square_root(2.25)
      1.5
      >>> square_root('a string')
      Traceback (most recent call last):
          ...
      TypeError: Input must be an integer or float
      """
      if not isinstance(x, (int, float)):
          raise TypeError('Input must be an integer or float')
      return x**0.5
  
output:     if not isinstance(x, (int, float)):
          raise TypeError('Input must be an integer or float')
      return x**0.5