def __init__(self, *, buffer=None, part=None, node_map=None, logger=None):
<EOL>assert buffer<EOL>assert node_map<EOL>super().__init__(buffer=buffer)<EOL>self._logger = logger or get_logger(name=__name__)<EOL>self._part = part<EOL>self._node_map = node_map<EOL>self._data = None<EOL>self._num_components_per_pixel = <NUM_LIT:0><EOL>symbolic = self.data_format<EOL>if self.x_padding > <NUM_LIT:0>:<EOL><INDENT>dtype = '<STR_LIT>'<EOL>bytes_per_pixel_data_component = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>if symbolic in uint16_formats:<EOL><INDENT>dtype = '<STR_LIT>'<EOL>bytes_per_pixel_data_component = <NUM_LIT:2><EOL><DEDENT>elif symbolic in uint32_formats:<EOL><INDENT>dtype = '<STR_LIT>'<EOL>bytes_per_pixel_data_component = <NUM_LIT:4><EOL><DEDENT>elif symbolic in float32_formats:<EOL><INDENT>dtype = '<STR_LIT>'<EOL>bytes_per_pixel_data_component = <NUM_LIT:4><EOL><DEDENT>elif symbolic in uint8_formats:<EOL><INDENT>dtype = '<STR_LIT>'<EOL>bytes_per_pixel_data_component = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>self._data = None<EOL>return<EOL><DEDENT><DEDENT>if symbolic in lmn_444_location_formats:<EOL><INDENT>num_components_per_pixel = <NUM_LIT><EOL><DEDENT>elif symbolic in lmn_422_location_formats:<EOL><INDENT>num_components_per_pixel = <NUM_LIT><EOL><DEDENT>elif symbolic in lmn_411_location_formats:<EOL><INDENT>num_components_per_pixel = <NUM_LIT><EOL><DEDENT>elif symbolic in lmno_4444_location_formats:<EOL><INDENT>num_components_per_pixel = <NUM_LIT><EOL><DEDENT>elif symbolic in mono_location_formats orsymbolic in bayer_location_formats:<EOL><INDENT>num_components_per_pixel = <NUM_LIT:1.><EOL><DEDENT>else:<EOL><INDENT>self._data = None<EOL>return<EOL><DEDENT>self._num_components_per_pixel = num_components_per_pixel<EOL>self._symbolic = symbolic<EOL>width = self.width<EOL>height = self.height<EOL>if self._part:<EOL><INDENT>count = self._part.data_size<EOL>count //= bytes_per_pixel_data_component<EOL>data_offset = self._part.data_offset<EOL><DEDENT>else:<EOL><INDENT>count = width * height<EOL>count *= num_components_per_pixel<EOL>count += self.y_padding<EOL>data_offset = <NUM_LIT:0><EOL><DEDENT>if _is_logging_buffer_manipulation:<EOL><INDENT>self._logger.debug(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT:)>'.format(<EOL>len(self._buffer.raw_buffer),<EOL>int(count),<EOL>dtype,<EOL>data_offset,<EOL>symbolic,<EOL>self.x_padding,<EOL>self.y_padding,<EOL>)<EOL>)<EOL><DEDENT>self._data = np.frombuffer(<EOL>self._buffer.raw_buffer,<EOL>count=int(count),<EOL>dtype=dtype,<EOL>offset=data_offset<EOL>)<EOL>
:param buffer:
:param part:
:param node_map: