code: def is_sparse(A):
      """Check if tensor A is a sparse tensor"""
      if isinstance(A, torch.Tensor):
          return A.layout == torch.sparse_coo
  
      error_str = "expected Tensor"
      if not torch.jit.is_scripting():
          error_str += f" but got {type(A)}"
      raise TypeError(error_str)
  
file_path: pytorch/torch/_linalg_utils.py
imports: from typing import Optional, Tuple
  import torch
  from torch import Tensor
label_desc: Use image node_id 1 for calling a global function with example usage: is_sparse(A) and returns: unknown