<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _sub_resource(self, path):
 """ get or create sub resource """

        if path not in self.resource_map:
            self.resource_map[path] = Resource(
                path, self.fetch, self.resource_map,
                default_headers=self.default_headers)
        return self.resource_map[path]