code: def _find_hdfs_start_end(f, offset, size):
      # As pyarrow doesn't support `readline` operation (https://github.com/apache/arrow/issues/3838),
      # we need to find the start and end of file block manually.
  
      # Be careful with HdfsFile's seek, it doesn't allow seek beyond EOF.
      loc = min(offset, f.size())
      f.seek(loc)
      start = _find_delimiter(f)
      loc = min(offset + size, f.size())
      f.seek(loc)
      end = _find_delimiter(f)
      return start, end
  
imports: from io import BytesIO
  from urllib.parse import urlparse
  import pandas
  import numpy
  from ...None import opcodes
  from ...config import options
  from ...core import OutputType
  from ...lib.filesystem import get_fs, open_file, file_size, glob
  from ...serialization.serializables import StringField, DictField, ListField, Int32Field, Int64Field, BoolField, AnyField
  from ...utils import parse_readable_size, lazy_import, FixedSizeFileObject
  from ..arrays import ArrowStringDtype
  from ..utils import parse_index, build_empty_df, to_arrow_dtypes, contain_arrow_dtype
  from .core import IncrementalIndexDatasource, ColumnPruneSupportedDataSourceMixin, IncrementalIndexDataSourceMixin, merge_small_files
label_desc: Use image node_id 2 for calling a global function with example usage: _find_hdfs_start_end(f, offset, size) and returns: start,  end