code: def find_frame(self, framefile, urltype=None, on_missing="warn"):
          
          if on_missing not in ("warn", "error", "ignore"):
              raise ValueError("on_missing must be 'warn', 'error', or 'ignore'.")
          framefile = os.path.basename(framefile)
          # parse file name for site, frame type
          try:
              site,frametype,_,_ = framefile.split("-")
          except Exception, e:
              raise RuntimeError("Error parsing filename %s: %s" % (framefile, e))
          url = ("%s/gwf/%s/%s/%s.json"
                % (_url_prefix, site, frametype, framefile))
          response = self._requestresponse("GET", url)
          urllist  = decode(response.read())
          if len(urllist) == 0:
              if on_missing == "warn":
                  sys.stderr.write("No files found!\n")
              elif on_missing == "error":
                  raise RuntimeError("No files found!")
          # verify urltype is what we want
          cache = lal.Cache(e for e in
                   [lal.CacheEntry.from_T050017(x, coltype=self.LIGOTimeGPSType)
                    for x in urllist] if not urltype or e.scheme == urltype)
          return cache
docs: Query the LDR host for a single framefile
  
          @returns: L{Cache<pycbc_glue.lal.Cache>}
  
          @param frametype:
              name of frametype to match
          @param urltype:
              file scheme to search for (e.g. 'file')
          @param on_missing:
              what to do when the requested frame isn't found, one of:
                  - C{'warn'} (default): print a warning,
                  - C{'error'}: raise an L{RuntimeError}, or
                  - C{'ignore'}: do nothing
  
          @type  frametype: L{str}
          @type    urltype: L{str}
          @type on_missing: L{str}
  
          @raises RuntimeError: if given framefile is malformed