def METHOD_NAME(
    request_args: dict, stack: ExitStack, test_block_config: TestConfig
) -> dict:
    """Get correct arguments for anything that should be passed as a file to
    requests
    Args:
        request_args: args passed to requests
        test_block_config: config for test
        stack: context stack to add file objects to so they're
            closed correctly after use
    Returns:
        mapping of 'files' block to pass directly to requests
    """
    files_to_send: Optional[Union[dict, List]] = None
    file_args = request_args.get("files")
    if isinstance(file_args, dict):
        files_to_send = _parse_file_mapping(file_args, stack, test_block_config)
    elif isinstance(file_args, list):
        files_to_send = _parse_file_list(file_args, stack, test_block_config)
    elif file_args is not None:
        raise exceptions.BadSchemaError(
            f"'files' key in a HTTP request can only be a dict or a list but was {type(file_args)}"
        )
    if files_to_send:
        return {"files": files_to_send}
    else:
        return {}