code: def read_task_from_index(task_family, index_file=None):
      
      # read task information from the index file given a task family
      if index_file is None:
          index_file = Config.instance().get_expanded("core", "index_file")
  
      # open and go through lines
      with open(index_file, "r") as f:
          for line in f.readlines():
              line = line.strip()
              if line.count(":") >= 2:
                  modid, family, params = line.split(":", 2)
                  if family == task_family:
                      return modid, family, params
  
      return None
docs: Returns module id, task family and space-separated parameters in a tuple for a task given by
      *task_family* from the *index_file*. When *None*, the *index_file* refers to the default as
      defined in :py:mod:`law.config`. Returns *None* when the task could not be found.