code: def format_interface_name(intf_type, port, ch_grp=0):
      
      if ch_grp > 0:
          return 'port-channel:%s' % str(ch_grp)
  
      return '%s:%s' % (intf_type.lower(), port)
docs: Method to format interface name given type, port.
  
      Given interface type, port, and channel-group, this
      method formats an interface name.  If channel-group is
      non-zero, then port-channel is configured.
  
      :param intf_type: Such as 'ethernet' or 'port-channel'
      :param port: unique identification -- 1/32 or 1
      :ch_grp: If non-zero, ignore other params and format
               port-channel<ch_grp>
      :returns: the full formatted interface name.
                ex: ethernet:1/32, port-channel:1