# Path: graphscale/check.py
# def isinst(obj: Any, ttype: Type, _msg: str=None) -> None:
# def invariant(condition: Any, msg: str) -> None:
# def failed(msg: str) -> NoReturn:
# 
# Path: graphscale/utils.py
# def is_camel_case(string: str) -> bool:
#     """Is the string potentially camel case? Only checks for capital letters currently"""
#     return bool(re.search('[A-Z]', string))
# 
# def to_snake_case(camel_case: str) -> str:
#     """Convert a camel case string to snake case. e.g. fooBar ==> foo_bar"""
#     with_underscores = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', camel_case)
#     return re.sub('([a-z0-9])([A-Z])', r'\1_\2', with_underscores).lower()


from datetime import datetime
from enum import Enum, auto
from typing import NamedTuple, List, Any, Union
from uuid import UUID
from graphql.language.ast import (
    EnumTypeDefinition, InputObjectTypeDefinition, ListType, NamedType, NonNullType,
    ObjectTypeDefinition, IntValue, StringValue, BooleanValue, Node, TypeDefinition, Value,
    InputValueDefinition, Directive, FieldDefinition, Type
)
from graphql.language.parser import parse
from graphql.language.source import Source
from graphscale import check
from graphscale.utils import is_camel_case, to_snake_case
    type_id: int
    is_pent: bool
    is_pent_mutation_data: bool
    is_pent_payload: bool
    type_varietal: TypeVarietal


def create_object_type_def(
    *, name: str, fields: List[GrappleField], is_pent: bool, type_id: int, is_pent_payload: bool
) -> GrappleTypeDef:
    return GrappleTypeDef(
        name=name,
        fields=fields,
        type_varietal=TypeVarietal.OBJECT,
        values=None,
        type_id=type_id,
        is_pent=is_pent,
        is_pent_mutation_data=False,
        is_pent_payload=is_pent_payload,
    )


def create_input_type_def(*, name: str, fields: List[GrappleField],
                          is_pent_mutation_data: bool) -> GrappleTypeDef:
    return GrappleTypeDef(
        name=name,
        fields=fields,
        type_varietal=TypeVarietal.INPUT,
        values=None,
        type_id=None,

# Path: graphscale/check.py
# def isinst(obj: Any, ttype: Type, _msg: str=None) -> None:
# def invariant(condition: Any, msg: str) -> None:
# def failed(msg: str) -> NoReturn:
# 
# Path: graphscale/utils.py
# def is_camel_case(string: str) -> bool:
#     """Is the string potentially camel case? Only checks for capital letters currently"""
#     return bool(re.search('[A-Z]', string))
# 
# def to_snake_case(camel_case: str) -> str:
#     """Convert a camel case string to snake case. e.g. fooBar ==> foo_bar"""
#     with_underscores = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', camel_case)
#     return re.sub('([a-z0-9])([A-Z])', r'\1_\2', with_underscores).lower()


# Path: graphscale/grapple/parser.py
from datetime import datetime
from enum import Enum, auto
from typing import NamedTuple, List, Any, Union
from uuid import UUID
from graphql.language.ast import (
    EnumTypeDefinition, InputObjectTypeDefinition, ListType, NamedType, NonNullType,
    ObjectTypeDefinition, IntValue, StringValue, BooleanValue, Node, TypeDefinition, Value,
    InputValueDefinition, Directive, FieldDefinition, Type
)
from graphql.language.parser import parse
from graphql.language.source import Source
from graphscale import check
from graphscale.utils import is_camel_case, to_snake_case

    type_id: int
    is_pent: bool
    is_pent_mutation_data: bool
    is_pent_payload: bool
    type_varietal: TypeVarietal


def create_object_type_def(
    *, name: str, fields: List[GrappleField], is_pent: bool, type_id: int, is_pent_payload: bool
) -> GrappleTypeDef:
    return GrappleTypeDef(
        name=name,
        fields=fields,
        type_varietal=TypeVarietal.OBJECT,
        values=None,
        type_id=type_id,
        is_pent=is_pent,
        is_pent_mutation_data=False,
        is_pent_payload=is_pent_payload,
    )


def create_input_type_def(*, name: str, fields: List[GrappleField],
                          is_pent_mutation_data: bool) -> GrappleTypeDef:
    return GrappleTypeDef(
        name=name,
        fields=fields,
        type_varietal=TypeVarietal.INPUT,
        values=None,
        type_id=None,

        is_pent=False,