def _to_snake_case(pascal_case):
 snake_case = re.sub('(^|[a-z])([A-Z])', (lambda match: '{0}_{1}'.format(match.group(1).lower(), match.group(2).lower())), pascal_case)
 return snake_case.lower().strip('_')

def _to_snake_case ( pascal_case ) : snake_case = re . sub ( '(^|[a-z])([A-Z])' , ( lambda match : '{0}_{1}' . format ( match . group ( 1 ) . lower ( ) , match . group ( 2 ) . lower ( ) ) ) , pascal_case ) return snake_case . lower ( ) . strip ( '_' )
convert a pascalcase string to its snake_case equivalent .