def METHOD_NAME(client, code, funcId, description, env_variables):
    upload_url = upload_function_files(client, code, env_variables)
    return CloudFunction(
        name=project_location_function_name(
            include_proj=True, include_loc=True, include_func=True, funcId=funcId
        ),
        description=description,
        source_upload_url=upload_url,
        runtime="nodejs16",
        entry_point="yourFunction",
        event_trigger=EventTrigger(
            event_type="providers/cloud.pubsub/eventTypes/topic.publish",
            resource=function_pubsub_name(funcId),
        ),
        environment_variables=env_variables,
    )