Question: I am trying to show a race course via the google api. I have gone in and created a [custom map](https://developers.google.com/maps/documentation/static-maps/support) and can't figure out how to show that from the api. I am trying to add this to a website and then want to add another API on top of it. 

[This is the map I have created](https://www.google.com/maps/d/viewer?mid=1NLv4DtgAA2edAYM_48Q4qkFT1dI&ll=39.55169386746729%2C-110.92371567871095&z=8)

[![Google MyMaps screenshot](https://i.stack.imgur.com/d9WX0.png)](https://i.stack.imgur.com/d9WX0.png)

Answer: 
This type isn't used in anything that comes with Python, and there's no Python-level API to create objects of this type. However, you can do it with a direct C API call:

```
import ctypes

PyInstanceMethod_New = ctypes.pythonapi.PyInstanceMethod_New
PyInstanceMethod_New.argtypes = (ctypes.py_object,)
PyInstanceMethod_New.restype = ctypes.py_object

arbitrary_callable = sum

instance_method = PyInstanceMethod_New(arbitrary_callable)

```

The name `instancemethod` looks a lot like a bound method object, but it turns out it's something else entirely. It's a weird internal thing that, according to its [documentation](https://docs.python.org/3/c-api/method.html#instance-method-objects), is supposed to be the new way for C types to represent their methods, except that the standard C-level API for creating a type doesn't actually use it.

According to [conversations](https://bugs.python.org/issue3787) on the Python issue tracker, this feature was requested by the developers of Cython and Pyrex. It looks like `pandas.tslib.NaT` is implemented in Cython, and the Cython implementation actually uses this type, where the standard C API for creating types doesn't.

Note that the situation is completely different on Python 2. On Python 2, this new type didn't exist, and `instancemethod` was the name of the type of method objects representing ordinary methods written in Python. In Python 3, the new type took that name, and the type of method objects for methods written in Python is now named `method`.
Python provides it, but basically only as part of their test suite AFAICT (no included batteries use it otherwise). You can make one for testing using the `_testcapi` module:

```
>>> import _testcapi
>>> testinstancemethod = _testcapi.instancemethod(str.__repr__)
>>> hash(testinstancemethod)
...
TypeError: unhashable type: 'instancemethod'

```