code: def get_snaps_install_info_from_origin(snaps, src, mode='classic'):
      
  
      if not src.startswith('snap:'):
          juju_log("Snap source is not a snap origin", 'WARN')
          return {}
  
      _src = src[5:]
      channel = '--channel={}'.format(_src)
  
      return {snap: {'channel': channel, 'mode': mode}
              for snap in snaps}
docs: Generate a dictionary of snap install information from origin
  
      @param snaps: List of snaps
      @param src: String of openstack-origin or source of the form
          snap:track/channel
      @param mode: String classic, devmode or jailmode
      @returns: Dictionary of snaps with channels and modes