input: Write a function to modify the given Python function such that it raises a `TypeError` if the input value is not an integer. The original function calculates the square root of the input.
  
  ### Input:
  def square_root(x):
      return x**0.5
  
  ### Output:
  def square_root(x):
      if not isinstance(x, int):
          raise TypeError('Input must be an integer')
      return x**0.5
  
  assert square_root(4) == 2.0
  try:
      square_root('4')
  except TypeError:
      pass
  else:
      assert False, 'Expected a TypeError'
  assert square_root(9) == 3.0
  try:
      square_root(4.5)
  except TypeError:
      pass
  else:
      assert False, 'Expected a TypeError'
output: def square_root(x):
      if not isinstance(x, int):
          raise TypeError('Input must be an integer')
      return x**0.5