code: def get_ips_from_string(ip_str):
      
      ip_list = []
  
      for ip in ip_str.split(','):
          clean_ip = ip.strip().lower()
          if clean_ip:
              ip_list.append(clean_ip)
  
      ip_count = len(ip_list)
      if ip_count > 0:
          if is_valid_ip(ip_list[0]) and is_valid_ip(ip_list[-1]):
              return ip_list, ip_count
  
      return [], 0
docs: Given a string, it returns a list of one or more valid IP addresses