code: def create_volume(self, volume_name: str, driver_spec: str = None):
          
          # Default values
          if driver_spec:
              driver = driver_spec
          else:
              driver = 'local'
  
          # Raise an exception if we are not a manager
          if not self._manager:
              raise RuntimeError('Services can only be deleted '
                                 'on swarm manager nodes')
  
          self._client.volumes.create(name=volume_name, driver=driver)
docs: Create new docker volumes.
  
          Only the manager nodes can create a volume
  
          Args:
              volume_name (string): Name for the new docker volume
              driver_spec (string): Driver for the docker volume