def stub_get_object(
        self, full_contents, start_byte=0, end_byte=None, extra_params=None
    ):
        """
        Stubs out the get_object operation.

        :param full_contents: The FULL contents of the object
        :param start_byte: The first byte to grab.
        :param end_byte: The last byte to grab.
        :param extra_params: Extra request parameters to expect.
        """
        get_object_response = {}
        expected_params = {}
        contents = full_contents
        end_byte_range = end_byte

        # If the start byte is set and the end byte is not, the end byte is
        # the last byte.
        if start_byte != 0 and end_byte is None:
            end_byte = len(full_contents) - 1

        # The range on get object where the the end byte is the last byte
        # should set the input range as e.g. Range='bytes=3-'
        if end_byte == len(full_contents) - 1:
            end_byte_range = ''

        # If this is a ranged get, ContentRange needs to be returned,
        # contents needs to be pruned, and Range needs to be an expected param.
        if end_byte is not None:
            contents = full_contents[start_byte : end_byte + 1]
            part_range = f'bytes={start_byte}-{end_byte_range}'
            content_range = (
                f'bytes={start_byte}-{end_byte}/{len(full_contents)}'
            )
            get_object_response['ContentRange'] = content_range
            expected_params['Range'] = part_range

        get_object_response.update(
            {
                "AcceptRanges": "bytes",
                "ETag": self.etag,
                "ContentLength": len(contents),
                "ContentType": "binary/octet-stream",
                "Body": io.BytesIO(contents),
                "ResponseMetadata": {"HTTPStatusCode": 200},
            }
        )
        expected_params.update({"Bucket": self.bucket, "Key": self.key})
        if extra_params is not None:
            expected_params.update(extra_params)

        self.stubber.add_response(
            method='get_object',
            service_response=get_object_response,
            expected_params=expected_params,
        )

        Stubs out the get_object operation.

        :param full_contents: The FULL contents of the object
        :param start_byte: The first byte to grab.
        :param end_byte: The last byte to grab.
        :param extra_params: Extra request parameters to expect.
        
tests/functional/test_s3.py