code: def __init__(
      self,
      delegate: Datasource,
      path_and_idxs: Union[
          str, List[str], Tuple[str, int], List[Tuple[str, int]]
      ],
      filesystem: Optional["pyarrow.fs.FileSystem"] = None,
      schema: Optional[Union[type, "pyarrow.lib.Schema"]] = None,
      open_stream_args: Optional[Dict[str, Any]] = None,
      meta_provider: BaseFileMetadataProvider = DefaultFileMetadataProvider(),
      partition_filter: "PathPartitionFilter" = None,
      # TODO(ekl) deprecate this once read fusion is available.
      _block_udf: Optional[Callable[[Block], Block]] = None,
      **reader_args,
  ):
      _check_pyarrow_version()
      self._delegate = delegate
      self._schema = schema
      self._open_stream_args = open_stream_args
      self._meta_provider = meta_provider
      self._partition_filter = partition_filter
      self._block_udf = _block_udf
      self._reader_args = reader_args
  
      has_idx = isinstance(
          path_and_idxs[0], tuple
      )  # include idx if paths is a list of Tuple[str, int]
      raw_paths_and_idxs = (
          path_and_idxs
          if has_idx
          else [(path, None) for path in path_and_idxs]
      )
  
      self._paths = []
      self._file_sizes = []
      for raw_path, idx in raw_paths_and_idxs:
          # Paths must be resolved and expanded
          if raw_path is None or is_http(raw_path):
              read_path = raw_path
              file_size = None  # unknown file size is None
          else:
              resolved_path, filesystem = _resolve_paths_and_filesystem(
                  [raw_path], filesystem
              )
              read_path, file_size = meta_provider.expand_paths(
                  resolved_path, filesystem
              )
              # expand_paths returns two lists, so get the first element of each
              read_path = read_path[0]
              file_size = file_size[0]
  
          self._paths.append((read_path, idx))
          self._file_sizes.append(file_size)
      self._filesystem = filesystem
  
imports: import contextlib
  import logging
  from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, TYPE_CHECKING, Union
  import ray
  import urllib3
  from packaging import version
  from ray.data.block import Block
  from ray.data.context import DatasetContext
  from ray.data.datasource.binary_datasource import BinaryDatasource
  from ray.data.datasource.datasource import Datasource, ReadTask
  from ray.data.datasource.file_based_datasource import _check_pyarrow_version, _resolve_paths_and_filesystem, _S3FileSystemWrapper, _wrap_s3_serialization_workaround, BaseFileMetadataProvider, BlockOutputBuffer, DefaultFileMetadataProvider
  from ludwig.utils.fs_utils import get_bytes_obj_from_http_path, is_http
label_desc: Use image node_id 1 to create a new _BinaryIgnoreNoneTypeDatasourceReader object  with example: obj = _BinaryIgnoreNoneTypeDatasourceReader(delegate, path_and_idxs, filesystem, schema, open_stream_args, meta_provider, partition_filter, _block_udf)