def copy_preprod(log_name, state_of_interest):
    pp_workspace = MC.get_preprod_workspace()
    r2d2_preprod = MC.get_r2d2_preprod_workspace(state_of_interest)

    copy_gps(log_name, pp_workspace, r2d2_preprod, state_of_interest)
def count_r2d2_lines(state_of_interest):
    pp_workspace = MC.get_r2d2_preprod_workspace(state_of_interest)
    pp_lines = CC.list_lines_fcs(pp_workspace)
    pp_dict = CC.count_list_fcs(pp_lines, C4.count_r2d2_fc_state)

    return pp_dict
                elif fc_gps_state == "PA" and row[-2].firstPoint.X >= 4200000 and row[-2].firstPoint.Y >= 6440000:
                    inserted_oid = iCur.insertRow(insert_row)
                    # print 'PA Match:', sCur[-1], sCur[-2].firstPoint.X, sCur[-2].firstPoint.Y
                    running_total += 1
    edit.stopOperation()
    edit.stopEditing(True)
    copy_logger.info("Total|" + str(running_total))


#
# start of program
#
log_name = "migrate5"
logger = mc.setup_logging(log_name)
logger.info("Starting program...")

mc.arcfm_disable()

states = ["OH", "PA", "VA"]

for gps_state in states:
    pp_workspace = mc.get_preprod_workspace()
    r2d2_preprod = mc.get_r2d2_preprod_workspace(gps_state)
    logger.info(pp_workspace + "-->" + r2d2_preprod)

    move_lines(logger, pp_workspace, r2d2_preprod, gps_state)

mc.arcfm_cleanup()

logger.info("Finished program")