code: def camel_to_underscore(string):
      
      string = FIRST_CAP_RE.sub(r'\1_\2', string)
      return ALL_CAP_RE.sub(r'\1_\2', string).lower()
docs: Convert camelcase to lowercase and underscore.
  
      Recipe from http://stackoverflow.com/a/1176023
  
      Args:
          string (str): The string to convert.
  
      Returns:
          str: The converted string.