<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_items(self, data, many):
 """Format data as a Resource object or list of Resource objects. See: http://jsonapi.org/format/#document-resource-objects """

        if many:
            return [self.format_item(item) for item in data]
        else:
            return self.format_item(data)