def place_line(self, device: cirq_google.GridDevice, length: int) -> GridQubitLineTuple:
        """Runs line sequence search.

        Args:
            device: Chip description.
            length: Required line length.

        Returns:
            Linear sequences found on the chip.

        Raises:
            ValueError: If search algorithm passed on initialization is not
                        recognized.
        """

        if not device.metadata.qubit_set:
            return GridQubitLineTuple()

        start: GridQubit = min(device.metadata.qubit_set)
        sequences: list[LineSequence] = []
        greedy_search: dict[str, list[GreedySequenceSearch]] = {
            'minimal_connectivity': [_PickFewestNeighbors(device, start)],
            'largest_area': [_PickLargestArea(device, start)],
            'best': [_PickFewestNeighbors(device, start), _PickLargestArea(device, start)],
        }

        algos = greedy_search.get(self.algorithm)
        if algos is None:
            raise ValueError(f"Unknown greedy search algorithm {self.algorithm}")

        for algorithm in algos:
            sequences.append(algorithm.get_or_search())

        return GridQubitLineTuple.best_of(sequences, length)
Runs line sequence search.

        Args:
            device: Chip description.
            length: Required line length.

        Returns:
            Linear sequences found on the chip.

        Raises:
            ValueError: If search algorithm passed on initialization is not
                        recognized.
        
cirq-google/cirq_google/line/placement/greedy.py