code: def parse_requirements(self, filename):
          
  
          cwd = os.path.dirname(filename)
  
          try:
              fd = open(filename, 'r')
              for i, line in enumerate(fd.readlines(), 0):
                  req = self.extract_requirement(line)
  
                  # if the line is not a requirement statement
                  if not req:
                      continue
  
                  req_path = req
  
                  if not os.path.isabs(req_path):
                      req_path = os.path.normpath(os.path.join(cwd, req_path))
  
                  if not os.path.exists(req_path):
                      logging.warning("Requirement '{0}' could not be resolved: '{1}' does not exist.".format(req, req_path))
                      if self.flags['cleanup']:
                          self.skip_unresolved_requirement(filename, i)
                      continue
  
                  # if the requirement is already added to the database, skip it
                  if req_path in self.req_paths:
                      logging.warning("Skipping duplicate requirement '{0}' at '{2}:{3}' [file '{1}'].".format(
                          req,
                          req_path,
                          filename,
                          i+1  # human-recognizable line number
                      ))
                      if self.flags['cleanup']:
                          self.skip_unresolved_requirement(filename, i)
                      continue
  
                  # store requirements to the global database
                  self.req_parents.append(filename)
                  self.req_paths.append(req_path)
                  self.req_linenos.append(i)
  
                  # recursion
                  self.parse_requirements(req_path)
              fd.close()
          except IOError as err:
              logging.warning("I/O error: {0}".format(err))
docs: Recursively find all the requirements needed
          storing them in req_parents, req_paths, req_linenos