code: def parse_magnet(magnet_uri):
      
      data = defaultdict(list)
      if not magnet_uri.startswith('magnet:'):
          return data
      else:
          magnet_uri = magnet_uri.strip('magnet:?')
          for segment in magnet_uri.split('&'):
              key, value = segment.split('=')
              if key == 'dn':
                  data['name'] = requests.utils.unquote(value).replace('+', '.')
              elif key == 'xt':
                  data['infoHash'] = value.strip('urn:btih:')
              elif key == 'tr':
                  data['trackers'].append(requests.utils.unquote(value))
              else:
                  data[key] = value
      return data
docs: returns a dictionary of parameters contained in a magnet uri