<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def chain_head(self):
 """ Return the head block of the current chain. """

        (vec_ptr, vec_len, vec_cap) = ffi.prepare_vec_result()

        try:
            _libexec(
                'commit_store_get_chain_head',
                self.pointer,
                ctypes.byref(vec_ptr),
                ctypes.byref(vec_len),
                ctypes.byref(vec_cap))
        except ValueError:
            return None

        return self.deserialize_block(
            ffi.from_rust_vec(vec_ptr, vec_len, vec_cap))