How to apply imported module to active object
Py console convenience variables

C and D are abbreviated named variables for our convenience in the python console (see startup message)

PYTHON INTERACTIVE CONSOLE 3.7.1 (default, Oct 22 2018, 11:21:55)  [GCC 8.2.0]

Command History:     Up/Down Arrow
Cursor:              Left/Right Home/End
Remove:              Backspace/Delete
Execute:             Enter
Autocomplete:        Ctrl-Space
Zoom:                Ctrl +/-, Ctrl-Wheel
Builtin Modules:     bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils
Convenience Imports: from mathutils import *; from math import *
Convenience Variables: C = bpy.context, D = bpy.data


Simply replace C with bpy.context in your script

On importing

you are importing the method main from the module bl_operators.uvcalc_smart_project1 similarly

from bl_operators import uvcalc_smart_project

uvcalc_smart_project.main(...)


for keeping one main method distinct from another main method imported from elsewhere by using module as a namespace.

IMO something like 

from bl_operators.uvcalc_smart_project import main as uv_smart_project
# and use via
uv_smart_project(...)


is distinct and readable.