How do I write Python code for an AWS lambda function which will convert easting and northings to longitude and latitude?

For example, if a CSV is uploaded into an S3 bucket it may contain either eastings/northings or longitude/latitude columns for the location of different features. I'd like to create a Python code which recognises this and knows what to do... e.g.

```
if in long/lat format = leave and move on to next function
else:
if in easting/northing then convert to long/lat and move on to next function

```

So far, I have my working Python code which will convert the eastings and northings to longitude and latitude (see below). Next I just neeed to write a function that recognises when to do this conversion.

```
from pyproj import Proj, transform

inProj = Proj(init='epsg:27700') #British National Grid
outProj = Proj(init='epsg:4326') #WGS84
x1,y1 = 357551,259776 #(x,y coordinates)
x2,y2 = transform(inProj,outProj,x1,y1) # convert to long/lat
print (y2,x2)

```

**edit**
The CSV that is uploaded to the S3 bucket has the following headers for ease of reference.

| Feature | Easting | Northing | Length | Date | Comments |
| --- | --- | --- | --- | --- | --- |
| Feature1 | 181016.6 | 32794.39 | 6.5 metres | 17/01/2020 |  |