def METHOD_NAME(self, param_keys, separator):
    # Check URL parameters
    for param_key in param_keys:
        try:
            params = {
                param.strip()
                for param in self.request.query_params[param_key].split(",")
                if separator in param or param.strip() in ("", "preserve")
            }
        except KeyError:
            continue
        if len(params) > 1 and params & {"", "preserve"}:
            raise ValidationError(
                detail={
                    "detail": f'IP parameter "{param_key}" cannot have addresses and "preserve" at the same time.',
                    "code": "inconsistent-parameter",
                }
            )
        if params:
            return [] if "" in params else list(params)
    # Check remote IP address
    client_ip = self.request.META.get("REMOTE_ADDR")
    if separator in client_ip:
        return [client_ip]
    # give up
    return []