<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_data(self):
 """ Validate specimen, sample, site, and location data. """

        warnings = {}
        spec_warnings, samp_warnings, site_warnings, loc_warnings = {}, {}, {}, {}
        if self.specimens:
            spec_warnings = self.validate_items(self.specimens, 'specimen')
        if self.samples:
            samp_warnings = self.validate_items(self.samples, 'sample')
        if self.sites:
            site_warnings = self.validate_items(self.sites, 'site')
        if self.locations:
            loc_warnings = self.validate_items(self.locations, 'location')
        return spec_warnings, samp_warnings, site_warnings, loc_warnings