code: def from_dict(self, document):
          
          # Get object attributes from Json document
          identifier = str(document['_id'])
          # Create list of group images from Json
          images = list()
          for grp_image in document['images']:
              images.append(GroupImage(
                  grp_image['identifier'],
                  grp_image['folder'],
                  grp_image['name'],
                  os.path.join(
                      self.image_manager.get_directory(grp_image['identifier']),
                      grp_image['name']
                  )
              ))
          # Create list of properties and add group size
          properties = document['properties']
          properties[PROPERTY_GROUPSIZE] = len(document['images'])
          # Directories are simply named by object identifier
          directory = os.path.join(self.directory, identifier)
          # Create image group handle.
          return ImageGroupHandle(
              identifier,
              properties,
              directory,
              images,
              attribute.attributes_from_dict(document['options']),
              timestamp=datetime.datetime.strptime(
                  document['timestamp'],
                  '%Y-%m-%dT%H:%M:%S.%f'
              ),
              is_active=document['active']
          )
docs: Create image group object from JSON document retrieved from database.
  
          Parameters
          ----------
          document : JSON
              Json document in database
  
          Returns
          -------
          ImageGroupHandle
              Handle for image group object