code: def read_digits(source, start, first_code):
      body = source.body
      position = start
      code = first_code
  
      if code is not None and 48 <= code <= 57:  # 0 - 9
          while True:
              position += 1
              code = char_code_at(body, position)
  
              if not (code is not None and 48 <= code <= 57):
                  break
  
          return position
  
      raise GraphQLSyntaxError(
          source,
          position,
          "Invalid number, expected digit but got: {}.".format(
              print_char_code(code)
          ),
      )
  
imports: import json
  from ..error import GraphQLSyntaxError
label_desc: Use image node_id 8 for calling a global function with example usage: read_digits(source, start, first_code) and returns: position