code: def validate(cls, cpf):
          u
          if cpf is None:
              return False
  
          cpf = CPF.clean(cpf)
  
          def mod11(value):
              return (value % 11) % 10
  
          dig1 = mod11(sum([(i + 1) * int(cpf[i]) for i in range(0, 9)]))
          dig2 = mod11(sum([i * int(cpf[i]) for i in range(1, 10)]))
  
          return cpf[-2:] == '{0}{1}'.format(dig1, dig2)
docs: u"""
          Válida o CPF.
  
          >>> CPF.validate(58119443659)
          True
          >>> CPF.validate(58119443650)
          False
          >>> CPF.validate('58119443659')
          True
          >>> CPF.validate('581.194.436-59')
          True