@staticmethod
def _call_method(obj, name):
    """
        Checks if a (file) object has a named method and returns the
        result of calling it.

        If the attribute does not exist or is not :py:func:`callable`,
        return :py:obj:`None`. Methods are assumed to be no-arg.

        Methods are expected to raise a :py:exc:`ValueError` if the file
        is closed. The error will be ignored and the return value will
        be :py:obj:`None`.
        """
    meth = getattr(obj, name, None)
    if meth is None or not callable(meth):
        return None
    try:
        return meth()
    except ValueError:
        return None
