def METHOD_NAME(self, obj):  # pylint: disable=E0202
    if isinstance(obj, numpy.integer):
        return int(obj)
    elif isinstance(obj, numpy.floating):
        return float(obj)
    elif isinstance(obj, numpy.bool_):
        return bool(obj)
    elif isinstance(obj, numpy.ndarray):
        return obj.tolist()
    elif isinstance(obj, (datetime, date,)):
        return obj.isoformat()
    else:
        return super(MyEncoder, self).METHOD_NAME(obj)