<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_struct_field(self, struct_name, field_name, x, y, p=0):
 """Read the value out of a struct maintained by SARK. This method is particularly useful for reading fields from the ``sv`` struct which, for example, holds information about system status. See ``sark.h`` for details. Parameters struct_name : string Name of the struct to read from, e.g., `"sv"` field_name : string Name of the field to read, e.g., `"eth_addr"` Returns ------- value The value returned is unpacked given the struct specification. Currently arrays are returned as tuples, e.g.:: # Returns a 20-tuple. cn.read_struct_field("sv", "status_map") # Fails cn.read_struct_field("sv", "status_map[1]") """

        # Look up the struct and field
        field, address, pack_chars = \
            self._get_struct_field_and_address(struct_name, field_name)
        length = struct.calcsize(pack_chars)

        # Perform the read
        data = self.read(address, length, x, y, p)

        # Unpack the data
        unpacked = struct.unpack(pack_chars, data)

        if field.length == 1:
            return unpacked[0]
        else:
            return unpacked