<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_schema(cls, schema):
 """Method that will fetch a Marshmallow schema flexibly. Args: schema (marshmallow.Schema|str):
 Either the schema class, an instance of a schema, or a Python path to a schema. Returns: marshmallow.Schema: The desired schema. Raises: TypeError: This is raised if the provided object isn't a Marshmallow schema. """

        if isinstance(schema, string_types):
            schema = cls._get_object_from_python_path(schema)

        if isclass(schema):
            schema = schema()

        if not isinstance(schema, Schema):
            raise TypeError("The schema must be a path to a Marshmallow "
                            "schema or a Marshmallow schema.")

        return schema