code: def lock(self):
          
          r = fapi.lock_workspace(self.namespace, self.name, self.api_url)
          fapi._check_response_code(r, 204)
          self.data['workspace']['isLocked'] = True
          return self
docs: Lock this Workspace.
  
          This causes the workspace to behave in a read-only way,
          regardless of access permissions.