def METHOD_NAME(self, mock_read, mock_init, mock_create_time):
    mock_init.side_effect = psutil.NoSuchProcess(123)
    mock_read.return_value = {}
    self.assertIsNone(PostmasterProcess.from_pidfile(''))
    mock_read.return_value = {"pid": "foo"}
    self.assertIsNone(PostmasterProcess.from_pidfile(''))
    mock_read.return_value = {"pid": "123"}
    self.assertIsNone(PostmasterProcess.from_pidfile(''))
    mock_init.side_effect = None
    with patch.object(psutil.Process, 'pid', 123), \
            patch.object(psutil.Process, 'ppid', return_value=124), \
            patch('os.getpid', return_value=125) as mock_ospid, \
            patch('os.getppid', return_value=126):
        self.assertIsNotNone(PostmasterProcess.from_pidfile(''))
        mock_create_time.return_value = 100000
        mock_read.return_value = {"pid": "123", "start_time": "200000"}
        self.assertIsNone(PostmasterProcess.from_pidfile(''))
        mock_read.return_value = {"pid": "123", "start_time": "foobar"}
        self.assertIsNotNone(PostmasterProcess.from_pidfile(''))
        mock_ospid.return_value = 123
        mock_read.return_value = {"pid": "123", "start_time": "100000"}
        self.assertIsNone(PostmasterProcess.from_pidfile(''))