Python relative import failing

tl;dr
sls offline works fine.
Deploy works fine.
Attempting to execute the lamba fails with “Internal server error”.
Cloudwatch logs show: “[ERROR] ImportError: attempted relative import with no known parent package”

The whole story:
This project was initially set up as a Node.js/Express serverless app. We have a handful of Node/Express functions, and they’re working fine.

We need to add a python function to the project. (Yes, it has to be python. And, yes, we would strongly prefer it be in the same project).

I followed this brief tutorial on using multiple runtimes in a serverless project, then made some changes to suit our needs. Here’s the resulting structure and relevant files:

# project structure
py/
    __init__.py
    templates.py
    validation.py
src/
    # ... files for node.js functions ...
handler.js
serverless.yml
# serverless.yml (boilerplate ommited)
frameworkVersion: '2'

provider:
  name: aws
  runtime: nodejs14.x
  lambdaHashingVersion: '20201221'

plugins:
  - serverless-python-requirements
  - serverless-offline
  - serverless-cloudside-plugin
custom:
  pythonRequirements:
    dockerizePip: true

package:
  individually: false
  exclude:
    - node_modules/*
    - .git/*

functions:
  ipv4info:
    handler: handler.ipv4info
    events:
      - http:
          path: ipv4info
          method: GET
          cors: true
  # ... more node functions ...
  templates:
    runtime: python3.9
    handler: py/templates.get_template
    module: ./py
    package:
      include:
        - py/__init__.py
        - py/templates.py
        - py/validation.py
    events:
      - http:
          method: get
          path: templates/{templateId}
      
resources:
  Resources:
    # ... some CloudFormation resources ...
# templates.py
import json
from .validation import validate_input

def get_template(event, context):
    is_valid, data, error_message = validate_input(event["pathParameters"], event["queryStringParameters"])
    # ...
# validation.py
def validate_input(path_parameters, query_string_parameters):
    # ...
// handler.js (included on the off chance that it's relevant)
const ipv4info = require('./src/endpoints/ipv4info');
// ... more imports ...

module.exports = {
    ipv4info,
    // ... more exports ...
};

Everything runs fine locally.
sls deploy works with no errors.
BUT Calling GET on the templates/{templateId} endpoint returns
status: 500

{
    "message": "Internal server error"
}

Looking at the cloudwatch logs reveals:

[ERROR] ImportError: attempted relative import with no known parent package
Traceback (most recent call last):
  File "/var/task/serverless_sdk/__init__.py", line 144, in wrapped_handler
    return user_handler(event, context)
  File "/var/task/s_templates.py", line 25, in error_handler
    raise e
  File "/var/task/s_templates.py", line 20, in <module>
    user_handler = serverless_sdk.get_user_handler('py/templates.get_template')
  File "/var/task/serverless_sdk/__init__.py", line 56, in get_user_handler
    user_module = import_module(user_module_name)
  File "/var/lang/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/var/task/py/templates.py", line 2, in <module>
    from .validation import validate_input
[ERROR] ImportError: attempted relative import with no known parent package Traceback (most recent call last):   File "/var/task/serverless_sdk/__init__.py", line 144, in wrapped_handler     return user_handler(event, context)   File "/var/task/s_templates.py", line 25, in error_handler     raise e   File "/var/task/s_templates.py", line 20, in <module>     user_handler = serverless_sdk.get_user_handler('py/templates.get_template')   File "/var/task/serverless_sdk/__init__.py", line 56, in get_user_handler     user_module = import_module(user_module_name)   File "/var/lang/lib/python3.9/importlib/__init__.py", line 127, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked   File "<frozen importlib._bootstrap_external>", line 850, in exec_module   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed   File "/var/task/py/templates.py", line 2, in <module>     from .validation import validate_input

Thanks in advance!!!