human
Solve the following python programming problem given the following code:
def _generate_func_close(self, stream) : 
    def generate_goto_offset(name) : 
        tmpl = 'ctx->parent.at = ctx->off_spc_{};'.format (name) 
        self._cg.add_line (tmpl) 
self._reset_per_func_state () 
    self._generate_func_close_proto (stream) 
    tmpl = templates._FUNC_CLOSE_BODY_BEGIN 
    self._cg.add_lines (tmpl) 
    self._cg.indent () 
    spc_type = stream.packet_context_type 
    if (spc_type is not None) : 
        if ('timestamp_end' in spc_type.fields) : 
            tmpl = '{} ts = ctx->parent.cbs.{}_clock_get_value(ctx->parent.data);' 
            field = spc_type.fields ['timestamp_end'] 
            clock = field.property_mappings [0].object 
            clock_ctype = clock.return_ctype 
            clock_name = clock.name 
            self._cg.add_line (tmpl.format (clock_ctype, clock_name)) 
            self._cg.add_empty_line () 
self._cg.add_cc_line ('do not close a packet that is not open') 
    self._cg.add_line ('if (!ctx->parent.packet_is_open) {') 
    self._cg.indent () 
    self._cg.add_line ('return;') 
    self._cg.unindent () 
    self._cg.add_line ('}') 
    self._cg.add_empty_line () 
    self._cg.add_cc_line ('save content size') 
    self._cg.add_line ('ctx->parent.content_size = ctx->parent.at;') 
    if (spc_type is not None) : 
        field_name = 'timestamp_end' 
        if (field_name in spc_type.fields) : 
            t = spc_type.fields [field_name] 
            ctype = self._get_type_ctype (t) 
            src = '({}) ts'.format (ctype) 
            self._cg.add_empty_line () 
            self._generate_field_name_cc_line (field_name) 
            generate_goto_offset (field_name) 
            self._restore_byte_offset (field_name) 
            self._generate_serialize_type (src, '(&ctx->parent)', t) 
field_name = 'content_size' 
        if ('content_size' in clock_ctype.fields) : 
            t = spc_type.fields [field_name] 
            ctype = self._get_type_ctype (t) 
            src = '({}) ctx->parent.content_size'.format (ctype) 
           ...

    
    

    Fix the buggy line: if ('content_size' in clock_ctype.fields) :
assistant
#Here is Python program to fix the buggy line: if ('content_size' in clock_ctype.

if ('content_size' in spc_type.fields) :