parameters: (strings, p_in, p_out)
return_statement: return u', '.join(ins+both+outs)
docstring: :param p_in: comma-seperated protocol list for inbound connections
       :type p_in: unicode
      :param p_out: comma-seperated protocol list for outbound connections
       :type p_out: unicode
      :return: user-friendly string describing in-/outbound connections
       :rtype: unicode
docstring_summary: :param p_in: comma-seperated protocol list for inbound connections
       :type p_in: unicode
      :param p_out: comma-seperated protocol list for outbound connections
       :type p_out: unicode
      :return: user-friendly string describing in-/outbound connections
       :rtype: unicode
docstring_tokens: : param p_in : comma - seperated protocol list for inbound connections : type p_in : unicode : param p_out : comma - seperated protocol list for outbound connections : type p_out : unicode : return : user - friendly string describing in - / outbound connections : rtype : unicode
function: def nice_protocol(strings, p_in, p_out):
      """
      
      :param p_in: comma-seperated protocol list for inbound connections
       :type p_in: unicode
      :param p_out: comma-seperated protocol list for outbound connections
       :type p_out: unicode
      :return: user-friendly string describing in-/outbound connections
       :rtype: unicode
      """
      pin = p_in.split(u',') if p_in else []
      pout = p_out.split(u',') if p_out else []
      protocols = set(pin) | set(pout)
      protocols.discard(u'')
      ins = []
      outs = []
      both = []
      for p in protocols:
          if p in pin and p in pout:
              both.append(u'{} {}'.format(p, strings.table_proto_io))
          elif p in pin:
              ins.append(u'{} {}'.format(p, strings.table_proto_i))
          else:
              outs.append(u'{} {}'.format(p, strings.table_proto_o))
      return u', '.join(ins+both+outs)
function_tokens: def nice_protocol ( strings , p_in , p_out ) : pin = p_in . split ( u',' ) if p_in else [ ] pout = p_out . split ( u',' ) if p_out else [ ] protocols = set ( pin ) | set ( pout ) protocols . discard ( u'' ) ins = [ ] outs = [ ] both = [ ] for p in protocols : if p in pin and p in pout : both . append ( u'{} {}' . format ( p , strings . table_proto_io ) ) elif p in pin : ins . append ( u'{} {}' . format ( p , strings . table_proto_i ) ) else : outs . append ( u'{} {}' . format ( p , strings . table_proto_o ) ) return u', ' . join ( ins + both + outs )