code: def isrecord(ds):
      """Is this dshape a record type?
  
      >>> isrecord('{name: string, amount: int}')
      True
      >>> isrecord('int')
      False
      >>> isrecord('?{name: string, amount: int}')
      True
      """
      if isinstance(ds, str):
          ds = dshape(ds)
      if isinstance(ds, DataShape) and len(ds) == 1:
          ds = ds[0]
      return isinstance(getattr(ds, "ty", ds), Record)
  
file_path: datashader/datashader/datashape/predicates.py
imports: import numpy
  from .util import collect, dshape
  from .internal_utils import remove
  from .coretypes import DataShape, Fixed, Var, Ellipsis, Record, Unit, date_, datetime_, TypeVar, to_numpy_dtype, Categorical
  from .typesets import floating, boolean
label_desc: Use image node_id 2 for calling a global function with example usage: isrecord(ds) and returns: isinstance