def METHOD_NAME(api_object):
    mlogger.debug('Attemping to serialize: %s', api_object)
    # wrap none in a none serializer for none values
    if api_object is None:
        return NoneSerializer()
    # make sure given type is a Revit API type
    if not api.is_api_object(api_object):
        raise PyRevitException("Only Revit API types are supported.")
    # get available serializers
    serializers = coreutils.get_all_subclasses(
        [Serializable, EnumSerializable]
        )
    # pick the compatible serializer
    try:
        compatible_serializer = \
            next(
                x for x in serializers
                if x.api_types and isinstance(api_object, x.api_types)
                )
        mlogger.debug('Serializer found for: %s', api_object)
        return compatible_serializer(api_object)
    except StopIteration:
        mlogger.debug('Serializer not found for: %s', api_object)
        # if no deserializer found,
        # see if given data is iterable
        # NOTE: commented this out since .serialize should only get api objects
        # if isinstance(api_object, Iterable):
        #     mlogger.debug('Iterating over: %s', api_object)
        #     return _serialize_items(api_object)
        # otherwise throw an exception
        raise PyRevitException(
            "No serializers have been implemented for \"%s\"" % repr(api_object)
            )