code: def snakify(name, sep='_'):
      ''' Convert CamelCase to snake_case. '''
      name = re.sub("([A-Z]+)([A-Z][a-z])", r"\1%s\2" % sep, name)
      name = re.sub("([a-z\\d])([A-Z])", r"\1%s\2" % sep, name)
      return name.lower(f snakify(name, sep='_'):
      ''' Convert CamelCase to snake_case. '''
      name = re.sub("([A-Z]+)([A-Z][a-z])", r"\1%s\2" % sep, name)
      name = re.sub("([a-z\\d])([A-Z])", r"\1%s\2" % sep, name)
      return name.lower()
docs: Convert CamelCase to snake_case.