<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_work_spec(self, work_spec_name):
        '''Get the dictionary defining some work spec.'''
        with self.registry.lock(identifier=self.worker_id) as session:
            return session.get(WORK_SPECS, work_spec_name)