code: def is_cf_contig(specs):
      is_c_contig = is_f_contig = False
  
      if len(specs) == 1 and specs == [("direct", "contig")]:
          is_c_contig = True
  
      elif specs[-1] == ("direct", "contig") and all(
          axis == ("direct", "follow") for axis in specs[:-1]
      ):
          # c_contiguous: 'follow', 'follow', ..., 'follow', 'contig'
          is_c_contig = True
  
      elif (
          len(specs) > 1
          and specs[0] == ("direct", "contig")
          and all(axis == ("direct", "follow") for axis in specs[1:])
      ):
          # f_contiguous: 'contig', 'follow', 'follow', ..., 'follow'
          is_f_contig = True
  
      return is_c_contig, is_f_contig
  
imports: from __future__ import absolute_import
  from .Errors import CompileError, error
  from .None import ExprNodes
  from .ExprNodes import IntNode, NameNode, AttributeNode
  from .None import Options
  from .Code import UtilityCode, TempitaUtilityCode
  from .UtilityCode import CythonUtilityCode
  from .None import Buffer
  from .None import PyrexTypes
  from .None import ModuleNode
label_desc: Use image node_id 19 for calling a global function with example usage: is_cf_contig(specs) and returns: is_c_contig,  is_f_contig