



def 	_lowerCAmelCase						(				__lowerCamelCase   :     int		,	__lowerCamelCase   :     int     ):



 """simple docstring"""





 if number < 0 or shift_amount < 0:
  raise ValueError("both inputs must be positive integers"     )

 __SCREAMING_SNAKE_CASE       :    Tuple       =	str(bin(snake_case__     )     )
 binary_number += "0" * shift_amount
 return binary_number






def 	_lowerCAmelCase						(				__lowerCamelCase   :     int		,	__lowerCamelCase   :     int     ):



 """simple docstring"""





 if number < 0 or shift_amount < 0:
  raise ValueError("both inputs must be positive integers"     )

 __SCREAMING_SNAKE_CASE       :    Tuple       =	str(bin(snake_case__     )     )[2:]
 if shift_amount >= len(snake_case__     ):
  return "0b0"
 __SCREAMING_SNAKE_CASE       :    Optional[Any]       =	binary_number[: len(snake_case__     ) - shift_amount]
 return "0b" + shifted_binary_number






def 	_lowerCAmelCase						(				__lowerCamelCase   :     int		,	__lowerCamelCase   :     int     ):



 """simple docstring"""





 if number >= 0:  # Get binary representation of positive number
  __SCREAMING_SNAKE_CASE       :    Tuple       =	"0" + str(bin(snake_case__     )     ).strip("-"     )[2:]
 else:  # Get binary (2's complement) representation of negative number
  __SCREAMING_SNAKE_CASE       :    Tuple       =	len(bin(snake_case__     )[3:]     )  # Find 2's complement of number
  __SCREAMING_SNAKE_CASE       :    Optional[Any]       =	bin(abs(snake_case__     ) - (1 << binary_number_length)     )[3:]
  __SCREAMING_SNAKE_CASE       :    Any       =	(
      "1" + "0" * (binary_number_length - len(snake_case__     )) + binary_number
  )

 if shift_amount >= len(snake_case__     ):
  return "0b" + binary_number[0] * len(snake_case__     )
 return (
     "0b"
     + binary_number[0] * shift_amount
     + binary_number[: len(snake_case__     ) - shift_amount]
 )


if __name__ == "__main__":
      import doctest

      doctest.testmod()











from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike

class       _SCREAMING_SNAKE_CASE	(UpperCamelCase ):





     def __init__(       self :							List[str]     ,  UpperCamelCase :							Optional[NestedDataStructureLike[PathLike]] = None     ,  UpperCamelCase :							Optional[NamedSplit] = None     ,  UpperCamelCase :							Optional[Features] = None     ,  UpperCamelCase :							str = None     ,  UpperCamelCase :							bool = False     ,  UpperCamelCase :							bool = False     ,  UpperCamelCase :							Optional[int] = None     ,  **UpperCamelCase :							Dict     ,  )->int:
      __SCREAMING_SNAKE_CASE       :    List[str]       =	path_or_paths
      __SCREAMING_SNAKE_CASE       :    Optional[int]       =	split if split or isinstance(UpperCamelCase     ,  UpperCamelCase				) else "train"
      __SCREAMING_SNAKE_CASE       :    Dict       =	features
      __SCREAMING_SNAKE_CASE       :    List[Any]       =	cache_dir
      __SCREAMING_SNAKE_CASE       :    Tuple       =	keep_in_memory
      __SCREAMING_SNAKE_CASE       :    Optional[Any]       =	streaming
      __SCREAMING_SNAKE_CASE       :    Optional[Any]       =	num_proc
      __SCREAMING_SNAKE_CASE       :    int       =	kwargs






     @abstractmethod
     def 	__snake_case    (       self :							Optional[int]				)->Union[Dataset, DatasetDict, IterableDataset, IterableDatasetDict]:
      pass






class       _SCREAMING_SNAKE_CASE	(UpperCamelCase ):





     def __init__(       self :							Optional[Any]     ,  UpperCamelCase :							Optional[Features] = None     ,  UpperCamelCase :							str = None     ,  UpperCamelCase :							bool = False     ,  UpperCamelCase :							bool = False     ,  UpperCamelCase :							Optional[int] = None     ,  **UpperCamelCase :							Dict     ,  )->Optional[int]:
      __SCREAMING_SNAKE_CASE       :    Optional[Any]       =	features
      __SCREAMING_SNAKE_CASE       :    str       =	cache_dir
      __SCREAMING_SNAKE_CASE       :    Any       =	keep_in_memory
      __SCREAMING_SNAKE_CASE       :    Optional[Any]       =	streaming
      __SCREAMING_SNAKE_CASE       :    int       =	num_proc
      __SCREAMING_SNAKE_CASE       :    Optional[Any]       =	kwargs






     @abstractmethod
     def 	__snake_case    (       self :							str				)->Union[Dataset, IterableDataset]:
      pass






