def _compute_branches_from_lines_to_open(self):
    """Draw a random line index from LINES_TO_OPEN for each
    scenario.
    """
    if (self.LINES_TO_OPEN is None) or (len(self.LINES_TO_OPEN) == 0):
        # Nothing to do.
        return None

    # Simply draw an index for each line.
    return self.rng.integers(low=0, high=len(self.LINES_TO_OPEN),
                             size=self.num_scenarios)