input: Write a python function to detect the language of a given text using langdetect library.
  assert detect_language("Hello, my name is John Smith") == "en"
  assert detect_language("Bonjour, je m'appelle Jean Dupont") == "fr"
  assert detect_language("Hola, mi nombre es Juan Pérez") == "es"
output: def detect_language(text):
      from langdetect import detect
      return detect(text)