

def request_dynamic_split(self, dynamic_split_request):
    assert (dynamic_split_request is not None)
    progress = dynamic_split_request.progress
    split_position = progress.position
    if (split_position is None):
        percent_complete = progress.percent_complete
        if (percent_complete is not None):
            if ((percent_complete <= 0) or (percent_complete >= 1)):
                logging.warning('FileBasedReader cannot be split since the provided percentage of work to be completed is out of the valid range (0, 1). Requested: %r', dynamic_split_request)
                return
            split_position = iobase.ReaderPosition()
            split_position.byte_offset = self.range_tracker.get_position_for_fraction_consumed(percent_complete)
        else:
            logging.warning('TextReader requires either a position or a percentage of work to be complete to perform a dynamic split request. Requested: %r', split_position)
            return
    if self.range_tracker.try_split_at_position(split_position.byte_offset):
        return iobase.DynamicSplitResultWithPosition(split_position)
    else:
        return

dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/io/fileio.py TextFileReader.request_dynamic_split/VarMisuse@118/280 `dynamic_split_request`->`split_position`