code: def check_meta(meta):
      
      if not isinstance(meta, dict):
          raise ValueError("bad metadata - not a dictionary")
      if not isinstance(meta.get("announce"), basestring):
          raise ValueError("bad announce URL - not a string")
      check_info(meta.get("info"))
  
      return meta
docs: Validate meta dict.
  
          Raise ValueError if validation fails.