code: def is_valid_cidr(string_network):
      
      if string_network.count('/') == 1:
          try:
              mask = int(string_network.split('/')[1])
          except ValueError:
              return False
  
          if mask < 1 or mask > 32:
              return False
  
          try:
              socket.inet_aton(string_network.split('/')[0])
          except socket.error:
              return False
      else:
          return False
      return True
docs: Very simple check of the cidr format in no_proxy variable.
  
      :rtype: bool