<human>:  Can you show me a Python function to create mongodb index using the Python function.
<bot>:
    coll.create_index(index_name, {'_id': '$exists'})
  except Exception as e:
    print(e)

# Enter the string
db_name = "mydb"
collection_name = "mydb_collection"
index_name = "mydb_index"

# Calling the function
print((create_mongodb_index(db_name, collection_name, index_name)))

#Example Output
# 'dict' object has no attribute 'in_transaction'
# None

#Remember to inspect code for bugs.