def METHOD_NAME(self, position: int) -> bool:
    """Seek to absolute position in buffer.
    This method only works as long as there is headroom available. Returns True if
    seek was successful, otherwise False.
    """
    # This is a special case where we allow seeking to the current position
    if position == self.position:
        return True
    # Absolute position (i.e. total amount of data read from buffer) has passed
    # headroom space, so we have no headroom data and thus seeking not possible.
    if not self._has_headroom_data:
        return False
    # Can only seek within headroom
    if position >= self._headroom:
        return False
    # There must be data in buffer for seeking to work
    headroom_data_in_buffer = min(self._headroom, len(self._buffer))
    if position > (headroom_data_in_buffer - 1):
        return False
    self._position = position
    return True  # We have headroom data and position is within it