<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_swagger_fragment(cls):
        '''Return the swagger-formatted fragment for the Resource Listing.'''
        if cls.__swagger_fragment:
            return cls.__swagger_fragment
        cls.__swagger_fragment = {
            'path': cls.endpoint_path.replace('<', '{').replace('>', '}'),
            'description': cls.description,
            'operations': cls.get_resource_operations(),
        }
        return cls.__swagger_fragment