def METHOD_NAME(self, request, obj=None, **kwargs):
    # Don't show any empty periods if there already are some (they can still be dynamically added).
    if obj and obj.pk:
        return (0 if obj.periods.exists() else 1)
    return 1