How does PyScript find and load Python modules like datetime?

I have a simple HTML, simple Python external file, and simple TOML properties file (with everything commented out) that works in my environment just fine, including after ensuring that the PyScript core modules are stored offline for offline testing.

However, I am still trying to figure out how it works by importing the Python datetime module that’s normally found in your Python folder when you install Python, which PyScript isn’t referencing.

index.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>CMA</title>
	
	<!-- SEE https://docs.pyscript.net/2025.3.1/user-guide/running-offline/ FOR PyScript OFFLINE REFERENCES -->

    <!-- Recommended meta tags -->
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />
	<meta name="ROBOTS" content="INDEX,FOLLOW" />
	<meta name="KEYWORDS" content="cma dandylabs iamadandy" />
	<meta name="DESCRIPTION" content="DandyLabs CMA" />
	<meta name="AUTHOR" content="Phil Powell" />

	<link rel="stylesheet" href="stylesheets/cma_styles.css" />	
	<link rel="icon" type="image/x-icon" href="http://www.iamadandy.com/iamadandy/images/favicon.ico" />

    <!-- This script tag bootstraps PyScript -->
    <!-- script type="module" src="https://pyscript.net/releases/2025.2.1/core.js"></script -->
	<script type="module" src="/pyscript/node_modules/public/pyscript/dist/core.js"></script>
</head>
<body>
	<div id="errors" class="error-container container-style" role="alert"></div>
	<div id="main_page" class="page-alignment">
		<div id="title" class="title-margin container-autowidth-alignment container-style container" role="heading" aria-level="1">
					<h1 class="title-spacing">CMA</h1>
				</div>
		<div id="main_image" role="img"></div>
		<div id="spacer1" class="container-spacer"></div>
		<div id="spacer2" class="container-spacer"></div>
		<div id="main_content_container" class="container-large-alignment">
			<div id="main_content"
							 class="container-alignment container-autowidth-alignment container-padding container-style container scrollable">
				<p id="loading"></p>
				<script type="py" src="includes/index.py" config="resources/pyscript.toml"></script>
			</div>
		</div>
	</div>
</body>
</html>

index.py:

from datetime import datetime 
from pyscript import document

time = datetime.now().strftime('%a, %b %d, %Y %I:%M %p').replace(' 0', ' ')
# SEE https://stackoverflow.com/questions/9525944/python-datetime-formatting-without-zero-padding FOR ZERO PADDING REMOVAL
text = 'Hello World<br /><br />Today is: ' + time
document.getElementById("loading").innerHTML = text;

Any ideas as to how the datetime module import works in this case?

Thanks