code: def pythonize(self, val):
          
          val = unique_value(val)
          matches = re.match(r"^([^:]*)(?::(\d+))?$", val)
          if matches is None:
              raise ValueError
  
          addr = {'address': matches.group(1)}
          if matches.group(2) is not None:
              addr['port'] = int(matches.group(2))
  
          return addr
docs: Convert value into a address ip format::
  
          * If value is a list, try to take the last element
          * match ip address and port (if available)
  
          :param val: value to convert
          :type val:
          :return: address/port corresponding to value
          :rtype: dict