<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get(cls, issue_type):
 """Returns the IssueType object for `issue_type`. If no existing object was found, a new type will be created in the database and returned Args: issue_type (str,int,IssueType):
 Issue type name, id or class Returns: :obj:`IssueType` """

        if isinstance(issue_type, str):
            obj = getattr(db, cls.__name__).find_one(cls.issue_type == issue_type)

        elif isinstance(issue_type, int):
            obj = getattr(db, cls.__name__).find_one(cls.issue_type_id == issue_type)

        elif isinstance(issue_type, cls):
            return issue_type

        else:
            obj = None

        if not obj:
            obj = cls()
            obj.issue_type = issue_type

            db.session.add(obj)
            db.session.commit()
            db.session.refresh(obj)

        return obj