code: def _get_inline_fragment(ast):
      
      if not ast.selection_set:
          # There is nothing selected here, so no fragment.
          return None
  
      fragments = [
          ast_node
          for ast_node in ast.selection_set.selections
          if isinstance(ast_node, InlineFragment)
      ]
  
      if not fragments:
          return None
  
      if len(fragments) > 1:
          raise GraphQLCompilationError(u'Cannot compile GraphQL with more than one fragment in '
                                        u'a given selection set.')
  
      return fragments[0]
docs: Return the inline fragment at the current AST node, or None if no fragment exists.