(self, chunk)
Simply finds the free chunk that would be the backwards chunk relative to the chunk at ptr. Hence, the free head
        and all other metadata are unaltered by this function.
Simply finds the free chunk that would be the backwards chunk relative to the chunk at ptr. Hence, the free head
        and all other metadata are unaltered by this function.
Simply finds the free chunk that would be the backwards chunk relative to the chunk at ptr . Hence the free head and all other metadata are unaltered by this function .
def _find_bck(self, chunk):
        """
        Simply finds the free chunk that would be the backwards chunk relative to the chunk at ptr. Hence, the free head
        and all other metadata are unaltered by this function.
        """
        cur = self.free_head_chunk
        if cur is None:
            return None
        fwd = cur.fwd_chunk()
        if cur == fwd:
            return cur
        # At this point there should be at least two free chunks in the heap
        if cur < chunk:
            while cur < fwd < chunk:
                cur = fwd
                fwd = cur.fwd_chunk()
            return cur
        else:
            while fwd != self.free_head_chunk:
                cur = fwd
                fwd = cur.fwd_chunk()
            return cur
def _find_bck ( self , chunk ) : cur = self . free_head_chunk if cur is None : return None fwd = cur . fwd_chunk ( ) if cur == fwd : return cur # At this point there should be at least two free chunks in the heap if cur < chunk : while cur < fwd < chunk : cur = fwd fwd = cur . fwd_chunk ( ) return cur else : while fwd != self . free_head_chunk : cur = fwd fwd = cur . fwd_chunk ( ) return cur