def METHOD_NAME(num_subs: int, input_file: str):
    active_sids = _load_subs(num_subs)
    allocate_ip_reqs = []
    for sid in active_sids:
        ip_req = AllocateIPRequest(
            sid=sid, version=AllocateIPRequest.IPV4,
            apn=TEST_APN,
        )  # hardcoding APN
        ip_req_dict = json_format.MessageToDict(ip_req)
        # Dumping AllocateIP request into json
        allocate_ip_reqs.append(ip_req_dict)
    with open(input_file, 'w') as file:
        json.dump(allocate_ip_reqs, file, separators=(',', ':'))