def METHOD_NAME(device_type, logfile="", device_id=None) -> Path or None:
    # get_filepath_to_log is being broken out so that we can use it in help/other templates to display which log file
    # is being loaded
    if device_type == "brewpi":
        try:
            device = BrewPiDevice.objects.get(id=device_id)
            log_filename = f'dev-{device.id}-{logfile}.log'
        except ObjectDoesNotExist:
            # Unable to load the device
            raise ValueError("No brewpi device with id {}".format(device_id))
    elif device_type == "spawner":
        log_filename = 'fermentrack-processmgr.log'
    elif device_type == "fermentrack":
        log_filename = 'fermentrack-stderr.log'
    elif device_type == "ispindel":
        log_filename = 'ispindel_raw_output.log'
    elif device_type == "huey":
        log_filename = f'huey-{logfile}.log'  # Logfile is stderr or stdout
    elif device_type == "tiltbridgejr":
        log_filename = 'tiltbridge-jr.log'
    elif device_type == "supervisord":
        log_filename = 'supervisord.log'
    else:
        return None
    # Once we've determined the filename from logfile and device_type, let's open it up & read it in
    logfile_path = settings.ROOT_DIR / 'log' / log_filename
    return logfile_path