Create a python object from the given data.

        This will use ``self.factory`` object's ``create()`` function to
        create the data.

        If no factory is defined, this will simply return the same data
        that was given.

def _create_object(self, data, request):
        """ Create a python object from the given data.

        This will use ``self.factory`` object's ``create()`` function to
        create the data.

        If no factory is defined, this will simply return the same data
        that was given.
        """

        if request.method.upper() == 'POST' and self.post_factory:
            fac_func = self.post_factory.create
        else:
            fac_func = self.factory.create

        if isinstance(data, (list, tuple)):
            return map(fac_func, data)
        else:
            return fac_func(data)