input: Write a python function to check if Django is installed and create a new project.
  assert check_django_project() == 'Django installed and myproject created'
  assert check_django_project() == 'Django already installed and myproject already exists'
output: def check_django_project():
      import subprocess
      import sys
      
      def is_django_installed():
          try:
              import django
              return True
          except ImportError:
              return False
  
      def create_project(project_name):
          result = subprocess.run([sys.executable, '-m', 'django', 'startproject', project_name], capture_output=True, text=True)
          return result.returncode == 0
  
      project_name = 'myproject'
      
      if not is_django_installed():
          subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'django'])
          if create_project(project_name):
              return 'Django installed and myproject created'
      else:
          try:
              with open(f'{project_name}/manage.py'):
                  return 'Django already installed and myproject already exists'
          except FileNotFoundError:
              if create_project(project_name):
                  return 'Django already installed and myproject created'