def METHOD_NAME(ip_ip, model, row_counter, request=None):
    """check IPs for valid values"""
    """ set username for logger """
    # if function was called from 'system_instant' and 'system_upload'
    if request:
        logger_username = str(request.user)
    # if function was called from 'system_cron'
    else:
        logger_username = model.csv_import_username.username
    """ perform checks """
    # value is an IP
    try:
        # check ip column for IP(s)
        ipaddress.ip_address(ip_ip)
        # create ip
        ip, created = Ip.objects.get_or_create(ip_ip=ip_ip)
        # IP was created
        if created:
            # call logger
            ip.logger(logger_username, ' SYSTEM_IMPORTER_FILE_CSV_IP_CREATED')
        # return IP to 'csv_attributes_add.add_many2many_attributes'
        return ip
    # value is not an IP
    except ValueError:
        # if function was called from 'system_instant' and 'system_upload'
        if request:
            # call message
            messages.warning(
                request,
                f'Value for IP address in row {row_counter} was not a valid IP address.',
            )
        # call logger
        warning_logger(
            logger_username,
            f' SYSTEM_IMPORTER_FILE_CSV_IP_COLUMN row_{row_counter}:invalid_ip',
        )
        # return nothing to 'csv_attributes_add.add_many2many_attributes'
        return None