      """ Obtain a serializer object
  
      Parameters
      ----------
      serializer: {'json', 'pickle', yaml'}
          The required serializer format
  
      Returns
      -------
      serializer: :class:`Serializer`
 
</s> remove     logger.warning("Unrecognized serializer: '%s'. Returning json serializer", serializer)
    return _JSONSerializer()
 </s> add         retval = _JSONSerializer
    else:
        logger.warning("Unrecognized serializer: '%s'. Returning json serializer", serializer)
    logger.debug(retval)
    return retval </s> remove             specified serializer will be used """
        logger.debug("Getting serializer: (filename: '%s', serializer: '%s')",
                     filename, serializer)
 </s> add             compressed pickle will be used """
        logger.debug("Getting serializer: (filename: '%s')", filename) </s> remove                     decide the serializer, and the serializer argument will
                    be ignored.
        serializer: If provided, this will be the format that the data is
                    saved in (if data is to be saved). Can be 'json', 'pickle'
                    or 'yaml'
 </s> add                     decide the serializer otherwise compressed pickle is used. </s> remove         filename:   Filename of alignments file excluding extension. If a
 </s> add         filename:   Filename of alignments file. If a </s> remove     if serializer.lower() == "json":
        return _JSONSerializer()
    if serializer.lower() == "pickle":
        return _PickleSerializer()
    if serializer.lower() == "yaml" and yaml is not None:
        return _YAMLSerializer()
    if serializer.lower() == "yaml" and yaml is None:
 </s> add     if serializer.lower() == "npy":
        retval = _NPYSerializer()
    elif serializer.lower() == "compressed":
        retval = _CompressedSerializer()
    elif serializer.lower() == "json":
        retval = _JSONSerializer()
    elif serializer.lower() == "pickle":
        retval = _PickleSerializer()
    elif serializer.lower() == "yaml" and yaml is not None:
        retval = _YAMLSerializer()
    elif serializer.lower() == "yaml" and yaml is None:
    serializer: {'json', 'pickle', yaml', 'npy', 'compressed'}
      """ Obtain a serializer object
  
      Parameters
      ----------
    serializer: {'json', 'pickle', yaml', 'npy', 'compressed'}
          The required serializer format
  
      Returns
      -------
      serializer: :class:`Serializer`
keep keep keep keep replace keep keep keep keep keep
 Serialize masks to alignments file

- Add new serializers (npy + compressed)
- Remove Serializer option from cli
- Revert get_aligned call in scripts/extract
- Default alignments to compressed
- Size masks to 128px and compress
- Remove mask thresholding/blur from generation code
- Add Mask class to lib/faces_detect
- Revert debug landmarks to aligned face
- Revert non-extraction code to staging version 
lib/serializer.py