<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_default(self, field):
 """ Set the object's attribute to its default value if it is missing and there is a default. Not responsible for initializing the attribute. That is done by the constructor. """


        # Record specification fields
        if field in RECORD_SPECS.index:
            # Return if no default to set, or if the field is already
            # present.
            if RECORD_SPECS.loc[field, 'write_default'] is None or getattr(self, field) is not None:
                return
            setattr(self, field, RECORD_SPECS.loc[field, 'write_default'])

        # Signal specification fields
        # Setting entire list default, not filling in blanks in lists.
        elif field in SIGNAL_SPECS.index:

            # Specific dynamic case
            if field == 'file_name' and self.file_name is None:
                self.file_name = self.n_sig * [self.record_name + '.dat']
                return

            item = getattr(self, field)

            # Return if no default to set, or if the field is already
            # present.
            if SIGNAL_SPECS.loc[field, 'write_default'] is None or item is not None:
                return

            # Set more specific defaults if possible
            if field == 'adc_res' and self.fmt is not None:
                self.adc_res = _signal._fmt_res(self.fmt)
                return

            setattr(self, field,
                   [SIGNAL_SPECS.loc[field, 'write_default']] * self.n_sig)