def check_args(args):
    """Check cmd line arguments are valid

    Args:
        args:
            dict of cmd line arguments
    """
    if args['use_presigned_url_gcs'] and args['gcp_private_key'] is None:
        raise ValueError(
            'Define --gcp-private-key to use presigned URLs on GCS (--use-presigned-url-gcs).'
            )
    if args['public_gcs'] and args['use_presigned_url_gcs']:
        raise ValueError(
            'Public GCS bucket (--public-gcs) cannot be presigned (--use-presigned-url-gcs and --gcp-private-key). Choose one of them.'
            )
    if args['tmp_dir'] is None:
        pass
    elif args['tmp_dir'].startswith(('http://', 'https://')):
        raise ValueError('URL is not allowed for --tmp-dir')
    elif args['tmp_dir'].startswith(('gs://', 's3://')):
        raise ValueError('Cloud URI is not allowed for --tmp-dir')
    if args['out_dir'].startswith(('http://', 'https://')):
        raise ValueError('URL is not allowed for --out-dir')
